public class DummyUrlFactory
extends java.lang.Object
URL from wich can read via URL.openStream().| Modifier and Type | Class and Description |
|---|---|
static class |
DummyUrlFactory.Connection |
static class |
DummyUrlFactory.StreamHandler |
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
PROTOCOL_PREFIX |
| Modifier and Type | Method and Description |
|---|---|
static java.net.URL |
get(java.io.InputStream inputStream)
Create a new dummy instance of
URL for the given inputStream. |
static java.net.URL |
get(java.io.InputStream inputStream,
java.lang.String urlStr)
Create a new dummy instance of
URL for the given inputStream. |
static java.net.URL |
get(java.lang.String string,
java.lang.String encoding)
Create a new dummy instance of
URL for the given string with encoding. |
static java.net.URL |
get(java.lang.String string,
java.lang.String encoding,
java.lang.String urlStr)
Create a new dummy instance of
URL for the given string with encoding. |
public static final java.lang.String PROTOCOL_PREFIX
public static java.net.URL get(java.io.InputStream inputStream)
throws java.net.MalformedURLException
URL for the given inputStream.
Note: Urls which are created in this way could only read one time.inputStream - to create the new URL instance for.java.net.MalformedURLExceptionpublic static java.net.URL get(java.io.InputStream inputStream,
java.lang.String urlStr)
throws java.net.MalformedURLException
URL for the given inputStream.
Note: Urls which are created in this way could only read one time.inputStream - to create the new URL instance for.urlStr - which is dispayed when the URL.toString() is used.java.net.MalformedURLExceptionpublic static java.net.URL get(java.lang.String string,
java.lang.String encoding)
throws java.net.MalformedURLException
URL for the given string with encoding.
Note: Urls which are created in this way could read multible times.string - which is auqired out when URL.openStream() is called.encoding - which is used to encode the string to stream when URL.openStream() is called.java.net.MalformedURLExceptionpublic static java.net.URL get(java.lang.String string,
java.lang.String encoding,
java.lang.String urlStr)
throws java.net.MalformedURLException
URL for the given string with encoding.
Note: Urls which are created in this way could read multible times.string - which is auqired out when URL.openStream() is called.encoding - which is used to encode the string to stream when URL.openStream() is called.urlStr - which is dispayed when the URL.toString() is used.java.net.MalformedURLExceptionCopyright © 2013 echocat. All Rights Reserved.