byte[] unzip(final byte[] data) throws IOException {
  final InputStream input=new ByteArrayInputStream(data);
  final byte[] buffer=new byte[1024];
  final ZipInputStream zip=new ZipInputStream(input);
  final ByteArrayOutputStream out=new ByteArrayOutputStream(data.length);
  int count=0;
  if (zip.getNextEntry() != null) {
    while ((count=zip.read(buffer)) != -1) {
      out.write(buffer,0,count);
    }
  }
  out.flush();
  zip.close();
  out.close();
  return out.toByteArray();
}

byte [ ] unzip ( final byte [ ] data ) throws IOException { final InputStream input = new ByteArrayInputStream ( data ) ; final byte [ ] buffer = new byte [ 1024 ] ; final ZipInputStream zip = new ZipInputStream ( input ) ; final ByteArrayOutputStream out = new ByteArrayOutputStream ( data . length ) ; int count = 0 ; if ( zip . getNextEntry ( ) != null ) { while ( ( count = zip . read ( buffer ) ) != - 1 ) { out . write ( buffer , 0 , count ) ; } } out . flush ( ) ; zip . close ( ) ; out . close ( ) ; return out . toByteArray ( ) ; }
unzips all elements in the file represented by byte [ ] data . needed by retrieverawjudgments which will retrieve a zip - file with a single json
