public static String readString(
      DataInputStream inputStream, String encoding, ThreadLocal<byte[]> strBufferLocal)
      throws IOException {
    int length = inputStream.readInt();
    return readString(inputStream, encoding, strBufferLocal, length);
  }
Read a string from the given stream.

@param inputStream the source to read.
@param encoding string encoding like 'utf-8'.
@param strBufferLocal a ThreadLocal buffer may be passed to avoid frequently memory
    allocations. A null may also be passed to use a local buffer.
@return a string read from the stream.
@throws IOException when an exception raised during operating the stream.
iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/utils/IOUtils.java