public String readString(){
  if (isEmpty())   throw new RuntimeException("Reading from empty input stream");
  StringBuilder sb=new StringBuilder();
  while (!isEmpty()) {
    char c=readChar();
    sb.append(c);
  }
  return sb.toString();
}

public String readString ( ) { if ( isEmpty ( ) ) throw new RuntimeException ( "Reading from empty input stream" ) ; StringBuilder sb = new StringBuilder ( ) ; while ( ! isEmpty ( ) ) { char c = readChar ( ) ; sb . append ( c ) ; } return sb . toString ( ) ; }
reads the remaining bytes of data from this binary input stream and return as a string .
