Package com.sun.ts.lib.util.sec.misc
Class Resource
java.lang.Object
com.sun.ts.lib.util.sec.misc.Resource
This class is used to represent a Resource that has been loaded from the class path.
- Since:
- 1.2
- Author:
- David Connelly
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the Resource data as a ByteBuffer, but only if the input stream was implemented on top of a ByteBuffer.byte[]getBytes()Returns the Resource data as an array of bytes.Returns theCertificates for the Resource, or null if none.Returns the code signers for the Resource, or null if none.abstract URLReturns the CodeSource URL for the Resource.abstract intReturns the length of the Resource data, or -1 if unknown.abstract InputStreamReturns an InputStream for reading the Resource data.Returns the Manifest for the Resource, or null if none.abstract StringgetName()Returns the name of the Resource.abstract URLgetURL()Returns the URL of the Resource.
-
Constructor Details
-
Resource
public Resource()
-
-
Method Details
-
getName
Returns the name of the Resource. -
getURL
Returns the URL of the Resource. -
getCodeSourceURL
Returns the CodeSource URL for the Resource. -
getInputStream
Returns an InputStream for reading the Resource data.- Throws:
IOException
-
getContentLength
Returns the length of the Resource data, or -1 if unknown.- Throws:
IOException
-
getBytes
Returns the Resource data as an array of bytes.- Throws:
IOException
-
getByteBuffer
Returns the Resource data as a ByteBuffer, but only if the input stream was implemented on top of a ByteBuffer. Returnnullotherwise.- Throws:
IOException
-
getManifest
Returns the Manifest for the Resource, or null if none.- Throws:
IOException
-
getCertificates
Returns theCertificates for the Resource, or null if none. -
getCodeSigners
Returns the code signers for the Resource, or null if none.
-