Class Resource

java.lang.Object
com.sun.ts.lib.util.sec.misc.Resource

public abstract class Resource extends Object
This class is used to represent a Resource that has been loaded from the class path.
Since:
1.2
Author:
David Connelly
  • Constructor Details

    • Resource

      public Resource()
  • Method Details

    • getName

      public abstract String getName()
      Returns the name of the Resource.
    • getURL

      public abstract URL getURL()
      Returns the URL of the Resource.
    • getCodeSourceURL

      public abstract URL getCodeSourceURL()
      Returns the CodeSource URL for the Resource.
    • getInputStream

      public abstract InputStream getInputStream() throws IOException
      Returns an InputStream for reading the Resource data.
      Throws:
      IOException
    • getContentLength

      public abstract int getContentLength() throws IOException
      Returns the length of the Resource data, or -1 if unknown.
      Throws:
      IOException
    • getBytes

      public byte[] getBytes() throws IOException
      Returns the Resource data as an array of bytes.
      Throws:
      IOException
    • getByteBuffer

      public ByteBuffer getByteBuffer() throws IOException
      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
    • getManifest

      public Manifest getManifest() throws IOException
      Returns the Manifest for the Resource, or null if none.
      Throws:
      IOException
    • getCertificates

      public Certificate[] getCertificates()
      Returns theCertificates for the Resource, or null if none.
    • getCodeSigners

      public CodeSigner[] getCodeSigners()
      Returns the code signers for the Resource, or null if none.