public abstract class

Resource

extends Object
java.lang.Object
   ↳ sun.misc.Resource

Class Overview

This class is used to represent a Resource that has been loaded from the class path.

Summary

Public Constructors
Resource()
Public Methods
ByteBuffer getByteBuffer()
Returns 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.
Certificate[] getCertificates()
Returns theCertificates for the Resource, or null if none.
CodeSigner[] getCodeSigners()
Returns the code signers for the Resource, or null if none.
abstract URL getCodeSourceURL()
Returns the CodeSource URL for the Resource.
abstract int getContentLength()
Returns the length of the Resource data, or -1 if unknown.
abstract InputStream getInputStream()
Returns an InputStream for reading the Resource data.
Manifest getManifest()
Returns the Manifest for the Resource, or null if none.
abstract String getName()
Returns the name of the Resource.
abstract URL getURL()
Returns the URL of the Resource.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public Resource ()

Public Methods

public ByteBuffer getByteBuffer ()

Returns the Resource data as a ByteBuffer, but only if the input stream was implemented on top of a ByteBuffer. Return null otherwise.

Throws
IOException

public byte[] getBytes ()

Returns the Resource data as an array of bytes.

Throws
IOException

public Certificate[] getCertificates ()

Returns theCertificates for the Resource, or null if none.

public CodeSigner[] getCodeSigners ()

Returns the code signers for the Resource, or null if none.

public abstract URL getCodeSourceURL ()

Returns the CodeSource URL for the Resource.

public abstract int getContentLength ()

Returns the length of the Resource data, or -1 if unknown.

Throws
IOException

public abstract InputStream getInputStream ()

Returns an InputStream for reading the Resource data.

Throws
IOException

public Manifest getManifest ()

Returns the Manifest for the Resource, or null if none.

Throws
IOException

public abstract String getName ()

Returns the name of the Resource.

public abstract URL getURL ()

Returns the URL of the Resource.