Class GZips


  • public class GZips
    extends Object
    Created by tchemit on 30/12/2017.
    Author:
    Tony Chemit - dev@tchemit.fr
    • Constructor Detail

      • GZips

        public GZips()
    • Method Detail

      • isGzipStream

        public static boolean isGzipStream​(InputStream inputStream)
                                    throws IOException
        Tests if an inputStream is GZipped.

        Note: the stream is not closed and is reset.

        Parameters:
        inputStream - inputStream to test
        Returns:
        true if inputStream is gzipped, false otherwise
        Throws:
        IOException - if any io errors while reading inputStream
        Since:
        3.0
      • bytesToStringBuffer

        public static StringBuffer bytesToStringBuffer​(byte[] in)
        Parameters:
        in - FIXME
        Returns:
        Retourne la string decompressee
      • bytesToString

        public static String bytesToString​(byte[] in)
        Parameters:
        in - FIXME
        Returns:
        la string decompressee
      • stringBufferToBytes

        public static byte[] stringBufferToBytes​(StringBuffer elem)
        Parameters:
        elem - FIXME
        Returns:
        Retourne la string compressee
      • stringToBytes

        public static byte[] stringToBytes​(String elem)
        Parameters:
        elem - FIXME
        Returns:
        Retourne la string compressee