public String readString() throws IOException {
  int size=readInt();
  if (Math.abs(size) > 100000000)   throw new IOException("Unreasonable string length: " + Math.abs(size));
  byte[] bytes=new byte[Math.abs(size)];
  int got=io.read(bytes,0,Math.abs(size));
  if (got != Math.abs(size))   throw new IOException("Bytes read: " + got + ", expected: "+ Math.abs(size));
  if (size < 0) {
    try {
      return compressor.inflateByteArray2String(-size,bytes);
    }
 catch (    DataFormatException e) {
      throw new IOException(e.getMessage());
    }
  }
 else {
    return Compressor.convertUncompressedByteArray2String(size,bytes);
  }
}

public String readString ( ) throws IOException { int size = readInt ( ) ; if ( Math . abs ( size ) > 100000000 ) throw new IOException ( "Unreasonable string length: " + Math . abs ( size ) ) ; byte [ ] bytes = new byte [ Math . abs ( size ) ] ; int got = io . read ( bytes , 0 , Math . abs ( size ) ) ; if ( got != Math . abs ( size ) ) throw new IOException ( "Bytes read: " + got + ", expected: " + Math . abs ( size ) ) ; if ( size < 0 ) { try { return compressor . inflateByteArray2String ( - size , bytes ) ; } catch ( DataFormatException e ) { throw new IOException ( e . getMessage ( ) ) ; } } else { return Compressor . convertUncompressedByteArray2String ( size , bytes ) ; } }
reads an archived string
