Package com.norconex.commons.lang.url
Class UrlStreamer
java.lang.Object
com.norconex.commons.lang.url.UrlStreamer
Provides a quick and easy way to stream a URL.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic InputStreamStreams URL content.static InputStreamstream(HttpURL url, Credentials creds) Streams URL content.static InputStreamstream(HttpURL url, Credentials creds, UrlStreamer.HttpHost proxy) Streams URL content.static InputStreamstream(HttpURL url, Credentials creds, UrlStreamer.HttpHost proxy, Credentials proxyCreds) Streams URL content.static InputStreamStreams URL content.static InputStreamstream(String url, Credentials creds) Streams URL content.static InputStreamstream(String url, Credentials creds, UrlStreamer.HttpHost proxy) Streams URL content.static InputStreamstream(String url, Credentials creds, UrlStreamer.HttpHost proxy, Credentials proxyCreds) Streams URL content.static InputStreamStreams URL content.static InputStreamstream(URL url, Credentials creds) Streams URL content.static InputStreamstream(URL url, Credentials creds, UrlStreamer.HttpHost proxy) Streams URL content.static InputStreamstream(URL url, Credentials creds, UrlStreamer.HttpHost proxy, Credentials proxyCreds) Streams URL content.static StringstreamToString(HttpURL url) Streams URL content to a String.static StringstreamToString(HttpURL url, Credentials creds) Streams URL content to a String.static StringstreamToString(HttpURL url, Credentials creds, UrlStreamer.HttpHost proxy) Streams URL content to a String.static StringstreamToString(HttpURL url, Credentials creds, UrlStreamer.HttpHost proxy, Credentials proxyCreds) Streams URL content to a String.static StringstreamToString(String url) Streams URL content to a String.static StringstreamToString(String url, Credentials creds) Streams URL content to a String.static StringstreamToString(String url, Credentials creds, UrlStreamer.HttpHost proxy) Streams URL content to a String using UTF-8 character encoding.static StringstreamToString(String url, Credentials creds, UrlStreamer.HttpHost proxy, Credentials proxyCreds) Streams URL content to a String using UTF-8 character encoding.static StringstreamToString(String url, Credentials creds, UrlStreamer.HttpHost proxy, Credentials proxyCreds, String charEncoding) Streams URL content to a String.static StringstreamToString(String url, Credentials creds, UrlStreamer.HttpHost proxy, String charEncoding) Streams URL content to a String.static StringstreamToString(URL url) Streams URL content to a String.static StringstreamToString(URL url, Credentials creds) Streams URL content to a String.static StringstreamToString(URL url, Credentials creds, UrlStreamer.HttpHost proxy) Streams URL content to a String.static StringstreamToString(URL url, Credentials creds, UrlStreamer.HttpHost proxy, Credentials proxyCreds) Streams URL content to a String.
-
Method Details
-
stream
Streams URL content.- Parameters:
url- the URL to stream- Returns:
- a URL content InputStream
-
stream
Streams URL content.- Parameters:
url- the URL to stream- Returns:
- a URL content InputStream
-
stream
Streams URL content.- Parameters:
url- the URL to stream- Returns:
- a URL content InputStream
-
stream
Streams URL content.- Parameters:
url- the URL to streamcreds- credentials for a protected URL- Returns:
- a URL content InputStream
-
stream
Streams URL content.- Parameters:
url- the URL to streamcreds- credentials for a protected URL- Returns:
- a URL content InputStream
-
stream
Streams URL content.- Parameters:
url- the URL to streamcreds- credentials for a protected URL- Returns:
- a URL content InputStream
-
stream
Streams URL content.- Parameters:
url- the URL to streamcreds- credentials for a protected URLproxy- proxy to use to stream the URL- Returns:
- a URL content InputStream
-
stream
Streams URL content.- Parameters:
url- the URL to streamcreds- credentials for a protected URLproxy- proxy to use to stream the URL- Returns:
- a URL content InputStream
-
stream
Streams URL content.- Parameters:
url- the URL to streamcreds- credentials for a protected URLproxy- proxy to use to stream the URL- Returns:
- a URL content InputStream
-
stream
public static InputStream stream(String url, Credentials creds, UrlStreamer.HttpHost proxy, Credentials proxyCreds) Streams URL content.- Parameters:
url- the URL to streamcreds- credentials for a protected URLproxy- proxy to use to stream the URLproxyCreds- credentials to access the proxy- Returns:
- a URL content InputStream
-
stream
public static InputStream stream(URL url, Credentials creds, UrlStreamer.HttpHost proxy, Credentials proxyCreds) Streams URL content.- Parameters:
url- the URL to streamcreds- credentials for a protected URLproxy- proxy to use to stream the URLproxyCreds- credentials to access the proxy- Returns:
- a URL content InputStream
-
stream
public static InputStream stream(HttpURL url, Credentials creds, UrlStreamer.HttpHost proxy, Credentials proxyCreds) Streams URL content.- Parameters:
url- the URL to streamcreds- credentials for a protected URLproxy- proxy to use to stream the URLproxyCreds- credentials to access the proxy- Returns:
- a URL content InputStream
-
streamToString
Streams URL content to a String using UTF-8 character encoding.- Parameters:
url- the URL to streamcreds- credentials for a protected URLproxy- proxy to use to stream the URL- Returns:
- a URL content as a String
-
streamToString
public static String streamToString(String url, Credentials creds, UrlStreamer.HttpHost proxy, String charEncoding) Streams URL content to a String.- Parameters:
url- the URL to streamcreds- credentials for a protected URLproxy- proxy to use to stream the URLcharEncoding- character encoding- Returns:
- a URL content as a String
-
streamToString
Streams URL content to a String.- Parameters:
url- the URL to streamcreds- credentials for a protected URLproxy- proxy to use to stream the URL- Returns:
- a URL content as a String
-
streamToString
Streams URL content to a String.- Parameters:
url- the URL to streamcreds- credentials for a protected URLproxy- proxy to use to stream the URL- Returns:
- a URL content as a String
-
streamToString
public static String streamToString(String url, Credentials creds, UrlStreamer.HttpHost proxy, Credentials proxyCreds) Streams URL content to a String using UTF-8 character encoding.- Parameters:
url- the URL to streamcreds- credentials for a protected URLproxy- proxy to use to stream the URLproxyCreds- credentials to access the proxy- Returns:
- a URL content as a String
-
streamToString
public static String streamToString(String url, Credentials creds, UrlStreamer.HttpHost proxy, Credentials proxyCreds, String charEncoding) Streams URL content to a String.- Parameters:
url- the URL to streamcreds- credentials for a protected URLproxy- proxy to use to stream the URLproxyCreds- credentials to access the proxycharEncoding- character encoding- Returns:
- a URL content as a String
-
streamToString
public static String streamToString(URL url, Credentials creds, UrlStreamer.HttpHost proxy, Credentials proxyCreds) Streams URL content to a String.- Parameters:
url- the URL to streamcreds- credentials for a protected URLproxy- proxy to use to stream the URLproxyCreds- credentials to access the proxy- Returns:
- a URL content as a String
-
streamToString
public static String streamToString(HttpURL url, Credentials creds, UrlStreamer.HttpHost proxy, Credentials proxyCreds) Streams URL content to a String.- Parameters:
url- the URL to streamcreds- credentials for a protected URLproxy- proxy to use to stream the URLproxyCreds- credentials to access the proxy- Returns:
- a URL content as a String
-
streamToString
Streams URL content to a String.- Parameters:
url- the URL to streamcreds- credentials for a protected URL- Returns:
- a URL content as a String
-
streamToString
Streams URL content to a String.- Parameters:
url- the URL to streamcreds- credentials for a protected URL- Returns:
- a URL content as a String
-
streamToString
Streams URL content to a String.- Parameters:
url- the URL to streamcreds- credentials for a protected URL- Returns:
- a URL content as a String
-
streamToString
Streams URL content to a String.- Parameters:
url- the URL to stream- Returns:
- a URL content as a String
- Since:
- 1.3
-
streamToString
Streams URL content to a String.- Parameters:
url- the URL to stream- Returns:
- a URL content as a String
- Since:
- 1.3
-
streamToString
Streams URL content to a String.- Parameters:
url- the URL to stream- Returns:
- a URL content as a String
- Since:
- 1.3
-