code: public static DataInputStream wrapInputStream(InputStream is, int bufferSize,
        int readBufferSize) {
      // wrapping BufferedByteInputStream in BufferedInputStream decreases
      // pressure on BBIS internal locks, and we read from the BBIS in
      // bigger chunks
      return new DataInputStream(new BufferedInputStream(
          new BufferedByteInputStream(is, bufferSize, readBufferSize)));
    }
docs: Wrap given input stream with BufferedByteInputOutput.
  This is the only way to instantiate the buffered input stream.
  @param is underlying input stream
  @param bufferSize size of the in memory buffer
  @param readBufferSize size of the buffer used for reading from is