public class GZUtil extends Object
Constructor and Description |
---|
GZUtil() |
Modifier and Type | Method and Description |
---|---|
static String |
bytesToString(byte[] in) |
static StringBuffer |
bytesToStringBuffer(byte[] in) |
static boolean |
isGzipStream(InputStream inputStream)
Tests if an inputStream is GZipped.
|
static byte[] |
stringBufferToBytes(StringBuffer elem) |
static byte[] |
stringToBytes(String elem) |
public static boolean isGzipStream(InputStream inputStream) throws IOException
Note: the stream is not closed and is reset.
inputStream
- inputStream to testtrue
if inputStream is gzipped, false
otherwiseIOException
- if any io errors while reading inputStreampublic static StringBuffer bytesToStringBuffer(byte[] in)
in
- FIXMEpublic static String bytesToString(byte[] in)
in
- FIXMEpublic static byte[] stringBufferToBytes(StringBuffer elem)
elem
- FIXMEpublic static byte[] stringToBytes(String elem)
elem
- FIXMECopyright © 2004–2020 CodeLutin. All rights reserved.