public int getLength() {
            return count;
        }
A reusable {@link java.io.DataInput} implementation that reads from an in-memory buffer.

This saves memory over creating a new DataInputStream and
ByteArrayInputStream each time data is read.

Typical usage is something like the following:

DataInputBuffer buffer = new DataInputBuffer();
while (... loop condition ...) {
  byte[] data = ... get data ...;
  int dataLength = ... get data length ...;
  buffer.reset(data, dataLength);
  ... read buffer using DataInput methods ...
}
inlong-common/src/main/java/org/apache/inlong/common/msg/DataInputBuffer.java