diff options
Diffstat (limited to 'src/java/com/healthmarketscience/jackcess/UsageMap.java')
-rw-r--r-- | src/java/com/healthmarketscience/jackcess/UsageMap.java | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/java/com/healthmarketscience/jackcess/UsageMap.java b/src/java/com/healthmarketscience/jackcess/UsageMap.java index c6ddbc7..642470b 100644 --- a/src/java/com/healthmarketscience/jackcess/UsageMap.java +++ b/src/java/com/healthmarketscience/jackcess/UsageMap.java @@ -128,7 +128,11 @@ public abstract class UsageMap { public List<Integer> getPageNumbers() { return _pageNumbers; } - + + public Integer getCurrentPageNumber() { + return _pageNumbers.get(_currentPageIndex - 1); + } + protected void setStartOffset(int startOffset) { _startOffset = startOffset; } @@ -166,8 +170,8 @@ public abstract class UsageMap { */ public boolean getNextPage(ByteBuffer buffer) throws IOException { if (_pageNumbers.size() > _currentPageIndex) { - Integer pageNumber = (Integer) _pageNumbers.get(_currentPageIndex++); - _pageChannel.readPage(buffer, pageNumber.intValue()); + Integer pageNumber = _pageNumbers.get(_currentPageIndex++); + _pageChannel.readPage(buffer, pageNumber); return true; } else { return false; |