private StreamSource getSource ( String pURI ) throws IOException , MalformedURLException { if ( pURI != null && pURI . indexOf ( "://" ) < 0 ) { // If local, get as stream return new StreamSource ( getResourceAsStream ( pURI ) ) ; } // ...else, create from URI string return new StreamSource ( pURI ) ; }
Returns a StreamSource object for the given URI