private void validateFields() throws IllegalArgumentException {
    checkNotNull(filePath, "Illegal ReaderContext, no filePath specified.");
    checkNotNull(fsdis, "Illegal ReaderContext, no StreamWrapper specified.");
    checkNotNull(hfs, "Illegal ReaderContext, no HFileSystem specified.");
    checkArgument(fileSize > 0L, "Illegal ReaderContext, fileSize <= 0");
  }
A builder that helps in building up the ReaderContext
hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/ReaderContextBuilder.java