private static String readStringBytesFromDataInput(DataInput dataInput, int len)
      throws IOException {
    if (len == 0) {
      return "";
    }
    byte[] buf = getThreadLocalByteArray(len);
    dataInput.readFully(buf, 0, len);
    @SuppressWarnings("deprecation") // intentionally using deprecated constructor
    final String string = new String(buf, 0, 0, len);
    return string;
  }
array len encoded as unsigned short in next 2 bytes

@since GemFire 5.7
geode-serialization/src/main/java/org/apache/geode/internal/serialization/StaticSerialization.java