if (rawBlob == null) {
return null;
}
try {
DataInputStream dais = new DataInputStream(new ByteArrayInputStream(rawBlob));
CompressionCodec codec = CodecFactory.getDeCompressionCodec(dais);
if (codec != null) {
string = codec.decompressToString(dais);
}
else {
string = new String(rawBlob, CodecFactory.UTF_8_ENCODING);
}
dais.close();