Package io.pack200

Class UnpackerImpl

    • Constructor Summary

      Constructors 
      Constructor Description
      UnpackerImpl()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.SortedMap<java.lang.String,​java.lang.String> properties()
      Get the set of options for the pack and unpack engines.
      java.lang.String toString()  
      void unpack​(java.io.File in, java.util.jar.JarOutputStream out)
      Takes an input File containing the pack file, and generates a JarOutputStream.
      void unpack​(java.io.InputStream in, java.util.jar.JarOutputStream out)
      Takes a packed-stream InputStream, and writes to a JarOutputStream.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • UnpackerImpl

        public UnpackerImpl()
    • Method Detail

      • properties

        public java.util.SortedMap<java.lang.String,​java.lang.String> properties()
        Get the set of options for the pack and unpack engines.
        Specified by:
        properties in interface Pack200.Unpacker
        Returns:
        A sorted association of option key strings to option values.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • unpack

        public void unpack​(java.io.InputStream in,
                           java.util.jar.JarOutputStream out)
                    throws java.io.IOException
        Takes a packed-stream InputStream, and writes to a JarOutputStream. Internally the entire buffer must be read, it may be more efficient to read the packed-stream to a file and pass the File object, in the alternate method described below.

        Closes its input but not its output. (The output can accumulate more elements.)

        Specified by:
        unpack in interface Pack200.Unpacker
        Parameters:
        in - an InputStream.
        out - a JarOutputStream.
        Throws:
        java.io.IOException - if an error is encountered.
      • unpack

        public void unpack​(java.io.File in,
                           java.util.jar.JarOutputStream out)
                    throws java.io.IOException
        Takes an input File containing the pack file, and generates a JarOutputStream.

        Does not close its output. (The output can accumulate more elements.)

        Specified by:
        unpack in interface Pack200.Unpacker
        Parameters:
        in - a File.
        out - a JarOutputStream.
        Throws:
        java.io.IOException - if an error is encountered.