code: public final String readUTF() throws IOException {
          int utfSize = readUnsignedShort();
          if (utfSize == 0) {
              return "";
          }
          byte[] buf = new byte[utfSize];
          if (read(buf, 0, buf.length) != buf.length) {
              throw new EOFException();
          }
          return ModifiedUtf8.decode(buf, new char[utfSize], 0, utfSize);
      }
docs: Reads a string that is encoded in {@link DataInput modified UTF-8} from
  this file. The number of bytes that must be read for the complete string
  is determined by the first two bytes read from the file. Blocks until all
  required bytes have been read, the end of the file is reached or an
  exception is thrown.
  
  @return the next string encoded in {@link DataInput modified UTF-8} from
  this file.
  @throws EOFException
  if the end of this file is detected.
  @throws IOException
  if this file is closed or another I/O error occurs.
  @throws UTFDataFormatException
  if the bytes read cannot be decoded into a character string.
  @see #writeUTF(String)