docs: function initBuffer(data) {
          // Create a new buffer to receive data if needed
          if (buffer === null) {
              buffer = new ByteBuffer(initBufferSize);
          }
          buffer.append(data);
          buffer.flip();
      }