Package io.ultreia.java4all.util
Class GZips
- java.lang.Object
-
- io.ultreia.java4all.util.GZips
-
public class GZips extends Object
Created by tchemit on 30/12/2017.- Author:
- Tony Chemit - dev@tchemit.fr
-
-
Constructor Summary
Constructors Constructor Description GZips()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StringbytesToString(byte[] in)static StringBufferbytesToStringBuffer(byte[] in)static booleanisGzipStream(InputStream inputStream)Tests if an inputStream is GZipped.static byte[]stringBufferToBytes(StringBuffer elem)static byte[]stringToBytes(String elem)
-
-
-
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:
trueif inputStream is gzipped,falseotherwise- 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
-
-