ResourceFactory for java.net.URL based resources.
| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private int | |
| pack-priv static Consumer | |
| private int | |
| private boolean |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public int | |
| public int | |
| public boolean | |
| public Resource | newResource(final URI
A URI. uri)Implements org. |
| public void | |
| public void | |
| public void |
| connectTimeout | back to summary |
|---|---|
| private int connectTimeout | |
| ON_SWEEP_LISTENER | back to summary |
|---|---|
| pack-priv static Consumer<InputStream> ON_SWEEP_LISTENER | |
| readTimeout | back to summary |
|---|---|
| private int readTimeout | |
| useCaches | back to summary |
|---|---|
| private boolean useCaches | |
| URLResourceFactory | back to summary |
|---|---|
| public URLResourceFactory() | |
| getConnectTimeout | back to summary |
|---|---|
| public int getConnectTimeout() URL Connection Connect Timeout
| |
| getReadTimeout | back to summary |
|---|---|
| public int getReadTimeout() URL Connection Read Timeout.
| |
| isUseCaches | back to summary |
|---|---|
| public boolean isUseCaches() | |
| newResource | back to summary |
|---|---|
| public Resource newResource(final URI uri) Implements org. Doc from org. Construct a resource from a uri. | |
| setConnectTimeout | back to summary |
|---|---|
| public void setConnectTimeout(int connectTimeout) | |
| setReadTimeout | back to summary |
|---|---|
| public void setReadTimeout(int readTimeout) | |
| setUseCaches | back to summary |
|---|---|
| public void setUseCaches(boolean useCaches) | |
| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private static final Cleaner | |
| private URLConnection | |
| private final int | |
| private URLResourceFactory. | |
| private final AutoLock | |
| private static final Logger | |
| private final int | |
| private final URI | |
| private final URL | |
| private final boolean |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected boolean | |
| public boolean | exists()
Overrides org. Files#exists(Path, LinkOption. with the following parameters:
getPath() and LinkOption#NOFOLLOW_LINKS.
|
| public String | getFileName()
Implements abstract org. The file name of the resource. |
| public String | getName()
Implements abstract org. |
| public Path | getPath()
Implements abstract org. |
| public URI | getRealURI()
Overrides org. The real URI of the resource. |
| public URI | getURI()
Implements abstract org. |
| public boolean | isContainedIn(Resource
the containing resource container)Overrides org. |
| public boolean | isDirectory()
Implements abstract org. |
| public boolean | isReadable()
Implements abstract org. |
| public Instant | lastModified()
Overrides org. |
| public long | |
| public InputStream | newInputStream()
Overrides org. |
| public ReadableByteChannel | newReadableByteChannel()
Overrides org. |
| public Resource | resolve(String
the encoded subUriPath subUriPath)Implements abstract org. |
| public String |
| CLEANER | back to summary |
|---|---|
| private static final Cleaner CLEANER | |
| connection | back to summary |
|---|---|
| private URLConnection connection | |
| connectTimeout | back to summary |
|---|---|
| private final int connectTimeout | |
| inputStreamReference | back to summary |
|---|---|
| private URLResourceFactory. | |
| lock | back to summary |
|---|---|
| private final AutoLock lock | |
| LOG | back to summary |
|---|---|
| private static final Logger LOG | |
| readTimeout | back to summary |
|---|---|
| private final int readTimeout | |
| uri | back to summary |
|---|---|
| private final URI uri | |
| url | back to summary |
|---|---|
| private final URL url | |
| useCaches | back to summary |
|---|---|
| private final boolean useCaches | |
| URLResource | back to summary |
|---|---|
| public URLResource(URI uri, int connectTimeout, int readTimeout, boolean useCaches) throws MalformedURLException | |
| checkConnection | back to summary |
|---|---|
| protected boolean checkConnection() throws IOException | |
| exists | back to summary |
|---|---|
| public boolean exists() Overrides org. Doc from org. Equivalent to
| |
| getFileName | back to summary |
|---|---|
| public String getFileName() Implements abstract org. Doc from org. The file name of the resource. This is the last segment of the path. | |
| getName | back to summary |
|---|---|
| public String getName() Implements abstract org. Doc from org. The full name of the resource. | |
| getPath | back to summary |
|---|---|
| public Path getPath() Implements abstract org. Doc from org. Return the Path corresponding to this resource. | |
| getRealURI | back to summary |
|---|---|
| public URI getRealURI() Overrides org. Doc from org. The real URI of the resource. If this Resource is an alias, ( | |
| getURI | back to summary |
|---|---|
| public URI getURI() Implements abstract org. Doc from org. URI representing the resource. | |
| isContainedIn | back to summary |
|---|---|
| public boolean isContainedIn(Resource container) Overrides org. Doc from org. Return true if this resource is contained in the Resource r, either because r is a folder or a jar file or any form of resource capable of containing other resources. | |
| isDirectory | back to summary |
|---|---|
| public boolean isDirectory() Implements abstract org. Doc from org. Return true if resource represents a directory of potential resources.
| |
| isReadable | back to summary |
|---|---|
| public boolean isReadable() Implements abstract org. Doc from org. True if the resource is readable.
| |
| lastModified | back to summary |
|---|---|
| public Instant lastModified() Overrides org. Doc from org. The time the resource was last modified.
| |
| length | back to summary |
|---|---|
| public long length() Overrides org. Doc from org. Length of the resource.
| |
| newInputStream | back to summary |
|---|---|
| public InputStream newInputStream() throws IOException Overrides org. Doc from org. Creates a new input stream to the resource.
| |
| newReadableByteChannel | back to summary |
|---|---|
| public ReadableByteChannel newReadableByteChannel() throws IOException Overrides org. Doc from org. Readable ByteChannel for the resource.
| |
| resolve | back to summary |
|---|---|
| public Resource resolve(String subUriPath) Implements abstract org. Doc from org. Resolve an existing Resource. | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void |
| InputStreamReference | back to summary |
|---|---|
| public InputStreamReference(InputStream initialValue) | |
| run | back to summary |
|---|---|
| public void run() Implements java. Doc from java. Runs this operation.
| |