@Override
  public boolean advance() throws IOException {
    int firstByte = in.read();
    if (firstByte == -1) {
      return false;
    } else {
      ((PBIS) in).unread(firstByte);
    }

    try {
      this.current = parseCell();
    } catch (IOException ioEx) {
      ((PBIS) in).resetBuf(1); // reset the buffer in case the underlying stream is read from upper
                               // layers
      rethrowEofException(ioEx);
    }
    return true;
  }
Base implementation for {@link Codec.Decoder}.
hbase-common/src/main/java/org/apache/hadoop/hbase/codec/BaseDecoder.java