code: public static String readPascalString(final DataInput pStream) throws IOException {
          // Get as many bytes as indicated by byte count
          int length = pStream.readUnsignedByte();
  
          byte[] bytes = new byte[length];
          pStream.readFully(bytes, 0, length);
  
          return new String(bytes, ENCODING);
      }
docs: Reads a Pascal String from the given stream.
  The input stream must be positioned at the length byte of the text,
  which can thus be a maximum of 255 characters long.
  
  @param pStream the input stream
  @return the text read
  
  @throws IOException if an I/O exception occurs during reading