Class GZIPUtils


  • public class GZIPUtils
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      GZIPUtils()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static byte[] compressBufferToArray​(java.nio.ByteBuffer input)
      Return a new byte array with the compressed contents of the input buffer
      static byte[] uncompressBufferToArray​(java.nio.ByteBuffer contentBuffer)  
      static byte[] uncompressStreamToArray​(java.io.InputStream stream)  
      • Methods inherited from class java.lang.Object

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

      • GZIP_CONTENT_ENCODING

        public static final java.lang.String GZIP_CONTENT_ENCODING
        See Also:
        Constant Field Values
    • Constructor Detail

      • GZIPUtils

        public GZIPUtils()
    • Method Detail

      • compressBufferToArray

        public static byte[] compressBufferToArray​(java.nio.ByteBuffer input)
        Return a new byte array with the compressed contents of the input buffer
        Parameters:
        input - byte buffer to compress
        Returns:
        a byte array containing the compressed data, or null if the input was null or there was an unexpected IOException while compressing
      • uncompressBufferToArray

        public static byte[] uncompressBufferToArray​(java.nio.ByteBuffer contentBuffer)
      • uncompressStreamToArray

        public static byte[] uncompressStreamToArray​(java.io.InputStream stream)