@Override
  public synchronized void mark(int readLimit) {
    this.mark = byteBuffer.position();
    this.readLimit = readLimit;
    byteBuffer.mark();
  }
Reads 'size' amount of bytes from the stream into the buffer.
@param stream The stream from which bytes need to be read. If the underlying stream is SocketInputStream, it needs
              to be blocking.
@param size The size that needs to be read from the stream
@throws IOException
ambry-utils/src/main/java/com/github/ambry/utils/ByteBufferInputStream.java