code: public static DataOutputStream wrapOutputStream(OutputStream os,
        int bufferSize, int writeBufferSize) {
      // wrapping BufferedByteOutputStream in BufferedOutputStream decreases
      // pressure on BBOS internal locks, and we read from the BBOS in
      // bigger chunks
      return new DataOutputStream(new BufferedOutputStream(
          new BufferedByteOutputStream(os, bufferSize, writeBufferSize)));
    }
docs: Wrap given output stream with BufferedByteInputOutput.
  This is the only way to instantiate the buffered output stream.
  @param os underlying output stream
  @param bufferSize size of the in memory buffer
  @param writeBufferSize size of the buffer used for writing to is