public interface ResourceHandle
getInputStream()
or getBytes()
) as well as
access resource metadata, such as attributes, certificates, etc.
As soon as the handle is no longer in use, it should be explicitly
close()
d, similarly to I/O streams.Modifier and Type | Method and Description |
---|---|
void |
close()
Closes a connection to the resource indentified by this handle.
|
Attributes |
getAttributes()
Return the Attributes of the resource, or null if none.
|
byte[] |
getBytes()
Returns this resource data as an array of bytes.
|
Certificate[] |
getCertificates()
Return the Certificates of the resource, or null if none.
|
URL |
getCodeSourceUrl()
Returns the CodeSource URL for the class or resource.
|
int |
getContentLength()
Returns the length of this resource data, or -1 if unknown.
|
InputStream |
getInputStream()
Returns and InputStream for reading this resource data.
|
Manifest |
getManifest()
Returns the Manifest of the JAR file from which this resource
was loaded, or null if none.
|
String |
getName()
Return the name of the resource.
|
URL |
getUrl()
Returns the URL of the resource.
|
boolean |
isDirectory()
Does this resource refer to a directory.
|
String getName()
boolean isDirectory()
URL getCodeSourceUrl()
InputStream getInputStream() throws IOException
IOException
int getContentLength()
byte[] getBytes() throws IOException
IOException
Manifest getManifest() throws IOException
IOException
Certificate[] getCertificates()
Attributes getAttributes() throws IOException
IOException
void close()
elasticsearch-river-jdbc