code: public static String readNullTerminatedString(InputStream in) throws IOException, EOFException {
      return readNullTerminatedString((DataInput) new DataInputStream(in));
    }
docs: Reads a null-terminated string of bytes from the specified input stream.
  @param in The <code>InputStream</code> to read from.
  @return The <code>String</code> read from the file.
  @throws IOException If an I/O error occurs
  @throws EOFException If the end of the file is reached before a null
  byte is read.