/** * Create a scanner that covers a range of records. * * @param beginRecNum * The RecordNum for the first record (inclusive). * @param endRecNum * The RecordNum for the last record (exclusive). To scan the whole * file, either specify endRecNum==-1 or endRecNum==getEntryCount(). * @return The TFile scanner that covers the specified range of records. * @throws IOException */ public Scanner createScannerByRecordNum(long beginRecNum, long endRecNum) throws IOException { if (beginRecNum < 0) beginRecNum = 0; if (endRecNum < 0 || endRecNum > getEntryCount()) { endRecNum = getEntryCount(); } return new Scanner(this, getLocationByRecordNum(beginRecNum), getLocationByRecordNum(endRecNum)); }
/** * Create a scanner that covers a range of records. * * @param beginRecNum * The RecordNum for the first record (inclusive). * @param endRecNum * The RecordNum for the last record (exclusive). To scan the whole * file, either specify endRecNum==-1 or endRecNum==getEntryCount(). * @return The TFile scanner that covers the specified range of records. * @throws IOException */ public Scanner createScannerByRecordNum(long beginRecNum, long endRecNum) throws IOException { if (beginRecNum < 0) beginRecNum = 0; if (endRecNum < 0 || endRecNum > getEntryCount()) { endRecNum = getEntryCount(); } return new Scanner(this, getLocationByRecordNum(beginRecNum), getLocationByRecordNum(endRecNum)); }
/** * Create a scanner that covers a range of records. * * @param beginRecNum * The RecordNum for the first record (inclusive). * @param endRecNum * The RecordNum for the last record (exclusive). To scan the whole * file, either specify endRecNum==-1 or endRecNum==getEntryCount(). * @return The TFile scanner that covers the specified range of records. * @throws IOException */ public Scanner createScannerByRecordNum(long beginRecNum, long endRecNum) throws IOException { if (beginRecNum < 0) beginRecNum = 0; if (endRecNum < 0 || endRecNum > getEntryCount()) { endRecNum = getEntryCount(); } return new Scanner(this, getLocationByRecordNum(beginRecNum), getLocationByRecordNum(endRecNum)); }
/** * Create a scanner that covers a range of records. * * @param beginRecNum * The RecordNum for the first record (inclusive). * @param endRecNum * The RecordNum for the last record (exclusive). To scan the whole * file, either specify endRecNum==-1 or endRecNum==getEntryCount(). * @return The TFile scanner that covers the specified range of records. * @throws IOException */ public Scanner createScannerByRecordNum(long beginRecNum, long endRecNum) throws IOException { if (beginRecNum < 0) beginRecNum = 0; if (endRecNum < 0 || endRecNum > getEntryCount()) { endRecNum = getEntryCount(); } return new Scanner(this, getLocationByRecordNum(beginRecNum), getLocationByRecordNum(endRecNum)); }
/** * Get a scanner that covers a specific key range. * * @param beginKey * Begin key of the scan (inclusive). If null, scan from the first * key-value entry of the TFile. * @param endKey * End key of the scan (exclusive). If null, scan up to the last * key-value entry of the TFile. * @return The actual coverage of the returned scanner will cover all keys * greater than or equal to the beginKey and less than the endKey. * @throws IOException */ public Scanner createScannerByKey(RawComparable beginKey, RawComparable endKey) throws IOException { if ((beginKey != null) && (endKey != null) && (compareKeys(beginKey, endKey) >= 0)) { return new Scanner(this, beginKey, beginKey); } return new Scanner(this, beginKey, endKey); }
/** * Get a scanner that covers a specific key range. * * @param beginKey * Begin key of the scan (inclusive). If null, scan from the first * key-value entry of the TFile. * @param endKey * End key of the scan (exclusive). If null, scan up to the last * key-value entry of the TFile. * @return The actual coverage of the returned scanner will cover all keys * greater than or equal to the beginKey and less than the endKey. * @throws IOException */ public Scanner createScannerByKey(RawComparable beginKey, RawComparable endKey) throws IOException { if ((beginKey != null) && (endKey != null) && (compareKeys(beginKey, endKey) >= 0)) { return new Scanner(this, beginKey, beginKey); } return new Scanner(this, beginKey, endKey); }
/** * Get a scanner that covers a portion of TFile based on byte offsets. * * @param offset * The beginning byte offset in the TFile. * @param length * The length of the region. * @return The actual coverage of the returned scanner tries to match the * specified byte-region but always round up to the compression * block boundaries. It is possible that the returned scanner * contains zero key-value pairs even if length is positive. * @throws IOException */ public Scanner createScannerByByteRange(long offset, long length) throws IOException { return new Scanner(this, offset, offset + length); }
/** * Get a scanner that covers a portion of TFile based on byte offsets. * * @param offset * The beginning byte offset in the TFile. * @param length * The length of the region. * @return The actual coverage of the returned scanner tries to match the * specified byte-region but always round up to the compression * block boundaries. It is possible that the returned scanner * contains zero key-value pairs even if length is positive. * @throws IOException */ public Scanner createScannerByByteRange(long offset, long length) throws IOException { return new Scanner(this, offset, offset + length); }
/** * Get a scanner that covers a portion of TFile based on byte offsets. * * @param offset * The beginning byte offset in the TFile. * @param length * The length of the region. * @return The actual coverage of the returned scanner tries to match the * specified byte-region but always round up to the compression * block boundaries. It is possible that the returned scanner * contains zero key-value pairs even if length is positive. * @throws IOException */ public Scanner createScannerByByteRange(long offset, long length) throws IOException { return new Scanner(this, offset, offset + length); }
/** * Get a scanner that covers a portion of TFile based on byte offsets. * * @param offset * The beginning byte offset in the TFile. * @param length * The length of the region. * @return The actual coverage of the returned scanner tries to match the * specified byte-region but always round up to the compression * block boundaries. It is possible that the returned scanner * contains zero key-value pairs even if length is positive. * @throws IOException */ public Scanner createScannerByByteRange(long offset, long length) throws IOException { return new Scanner(this, offset, offset + length); }
/** * Get a scanner that covers a portion of TFile based on byte offsets. * * @param offset * The beginning byte offset in the TFile. * @param length * The length of the region. * @return The actual coverage of the returned scanner tries to match the * specified byte-region but always round up to the compression * block boundaries. It is possible that the returned scanner * contains zero key-value pairs even if length is positive. * @throws IOException */ public Scanner createScannerByByteRange(long offset, long length) throws IOException { return new Scanner(this, offset, offset + length); }
/** * Get a scanner than can scan the whole TFile. * * @return The scanner object. A valid Scanner is always returned even if * the TFile is empty. * @throws IOException */ public Scanner createScanner() throws IOException { return new Scanner(this, begin, end); }
/** * Get a scanner than can scan the whole TFile. * * @return The scanner object. A valid Scanner is always returned even if * the TFile is empty. * @throws IOException */ public Scanner createScanner() throws IOException { return new Scanner(this, begin, end); }
/** * Get a scanner than can scan the whole TFile. * * @return The scanner object. A valid Scanner is always returned even if * the TFile is empty. * @throws IOException */ public Scanner createScanner() throws IOException { return new Scanner(this, begin, end); }
/** * Get a scanner than can scan the whole TFile. * * @return The scanner object. A valid Scanner is always returned even if * the TFile is empty. * @throws IOException */ public Scanner createScanner() throws IOException { return new Scanner(this, begin, end); }
/** * Get a scanner than can scan the whole TFile. * * @return The scanner object. A valid Scanner is always returned even if * the TFile is empty. * @throws IOException */ public Scanner createScanner() throws IOException { return new Scanner(this, begin, end); }
/** * Create a scanner that covers a range of records. * * @param beginRecNum * The RecordNum for the first record (inclusive). * @param endRecNum * The RecordNum for the last record (exclusive). To scan the whole * file, either specify endRecNum==-1 or endRecNum==getEntryCount(). * @return The TFile scanner that covers the specified range of records. * @throws IOException */ public Scanner createScannerByRecordNum(long beginRecNum, long endRecNum) throws IOException { if (beginRecNum < 0) beginRecNum = 0; if (endRecNum < 0 || endRecNum > getEntryCount()) { endRecNum = getEntryCount(); } return new Scanner(this, getLocationByRecordNum(beginRecNum), getLocationByRecordNum(endRecNum)); }
/** * Get a scanner that covers a specific key range. * * @param beginKey * Begin key of the scan (inclusive). If null, scan from the first * key-value entry of the TFile. * @param endKey * End key of the scan (exclusive). If null, scan up to the last * key-value entry of the TFile. * @return The actual coverage of the returned scanner will cover all keys * greater than or equal to the beginKey and less than the endKey. * @throws IOException */ public Scanner createScannerByKey(RawComparable beginKey, RawComparable endKey) throws IOException { if ((beginKey != null) && (endKey != null) && (compareKeys(beginKey, endKey) >= 0)) { return new Scanner(this, beginKey, beginKey); } return new Scanner(this, beginKey, endKey); }
/** * Get a scanner that covers a portion of TFile based on byte offsets. * * @param offset * The beginning byte offset in the TFile. * @param length * The length of the region. * @return The actual coverage of the returned scanner tries to match the * specified byte-region but always round up to the compression * block boundaries. It is possible that the returned scanner * contains zero key-value pairs even if length is positive. * @throws IOException */ public Scanner createScannerByByteRange(long offset, long length) throws IOException { return new Scanner(this, offset, offset + length); }
/** * Get a scanner than can scan the whole TFile. * * @return The scanner object. A valid Scanner is always returned even if * the TFile is empty. * @throws IOException */ public Scanner createScanner() throws IOException { return new Scanner(this, begin, end); }