public static String readString(DataInputStream in) throws IOException {
  int llength=in.readInt();
  if (llength == -1)   return null;
  byte a[]=new byte[llength];
  in.readFully(a,0,llength);
  return new String(a);
}

public static String readString ( DataInputStream in ) throws IOException { int llength = in . readInt ( ) ; if ( llength == - 1 ) return null ; byte a [ ] = new byte [ llength ] ; in . readFully ( a , 0 , llength ) ; return new String ( a ) ; }
read string from datainputstream motivation : readutf can ' t print lines larger than ushortmax
