@Override
  public int read() throws IOException {
    if (currentPosition + 1 > endPosition) {
      throw new IndexOutOfBoundsException("Trying to read outside the available read window");
    }
    ByteBuffer buf = ByteBuffer.allocate(1);
    readable.readInto(buf, currentPosition);
    currentPosition += 1;
    buf.flip();
    return buf.get() & 0xFF;
  }
Recovers a set of messages from a given start and end offset
from the read interface that represents the underlying store
ambry-messageformat/src/main/java/com/github/ambry/messageformat/BlobStoreRecovery.java