Class Pack200Streams


  • public final class Pack200Streams
    extends java.lang.Object
    Internal wrapper for the weird Pack200 Java API to allow usage with streams.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private Pack200Streams()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      private static java.io.IOException newIOException​(java.lang.Throwable cause)  
      static void pack​(byte[] source, java.io.OutputStream output)
      Packs a buffer in JAR/ZIP format into a stream in Pack200 format.
      static java.io.InputStream unpack​(java.io.InputStream input)
      Unpack a stream in Pack200 format into a stream in JAR/ZIP format.
      • Methods inherited from class java.lang.Object

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

      • Pack200Streams

        private Pack200Streams()
    • Method Detail

      • unpack

        public static java.io.InputStream unpack​(java.io.InputStream input)
                                          throws java.io.IOException
        Unpack a stream in Pack200 format into a stream in JAR/ZIP format.
        Parameters:
        input - stream in Pack200 format
        Returns:
        stream in JAR/ZIP format
        Throws:
        java.io.IOException - in case of errors with the streams
      • pack

        public static void pack​(byte[] source,
                                java.io.OutputStream output)
                         throws java.io.IOException
        Packs a buffer in JAR/ZIP format into a stream in Pack200 format.
        Parameters:
        source - source in JAR/ZIP format
        output - stream in Pack200 format
        Throws:
        java.io.IOException - in case of errors with the streams
      • newIOException

        private static java.io.IOException newIOException​(java.lang.Throwable cause)