* @throws IOException if an error occurs while initializing the internal {@link org.apache.any23.http.HTTPClient}.
*/
public DocumentSource createDocumentSource(String documentURI) throws URISyntaxException, IOException {
if(documentURI == null) throw new NullPointerException("documentURI cannot be null.");
if (documentURI.toLowerCase().startsWith("file:")) {
return new FileDocumentSource( new File(new URI(documentURI)) );
}
if (documentURI.toLowerCase().startsWith("http:") || documentURI.toLowerCase().startsWith("https:")) {
return new HTTPDocumentSource(getHTTPClient(), documentURI);
}
throw new IllegalArgumentException(