Class UsageMap
- java.lang.Object
-
- com.healthmarketscience.jackcess.impl.UsageMap
-
public class UsageMap extends Object
Describes which database pages a particular table uses- Author:
- Tim McCune
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classUsageMap.PageCursorUtility class to traverse over the pages in the UsageMap.
-
Field Summary
Fields Modifier and Type Field Description static byteMAP_TYPE_INLINEInline map typestatic byteMAP_TYPE_REFERENCEReference map type, for maps that are too large to fit inline
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddPageNumber(int pageNumber)Add a page number to this usage mapbooleancontainsPageNumber(int pageNumber)Determines if the given page number is contained in this map.UsageMap.PageCursorcursor()DatabaseImplgetDatabase()JetFormatgetFormat()PageChannelgetPageChannel()intgetPageCount()static UsageMapread(DatabaseImpl database, ByteBuffer buf)voidremovePageNumber(int pageNumber)Remove a page number from this usage mapStringtoString()
-
-
-
Field Detail
-
MAP_TYPE_INLINE
public static final byte MAP_TYPE_INLINE
Inline map type- See Also:
- Constant Field Values
-
MAP_TYPE_REFERENCE
public static final byte MAP_TYPE_REFERENCE
Reference map type, for maps that are too large to fit inline- See Also:
- Constant Field Values
-
-
Method Detail
-
getDatabase
public DatabaseImpl getDatabase()
-
getFormat
public JetFormat getFormat()
-
getPageChannel
public PageChannel getPageChannel()
-
read
public static UsageMap read(DatabaseImpl database, ByteBuffer buf) throws IOException
- Parameters:
database- database that contains this usage mapbuf- buffer which contains the usage map row info- Returns:
- Either an InlineUsageMap or a ReferenceUsageMap, depending on which type of map is found
- Throws:
IOException
-
cursor
public UsageMap.PageCursor cursor()
-
getPageCount
public int getPageCount()
-
containsPageNumber
public boolean containsPageNumber(int pageNumber)
Determines if the given page number is contained in this map.
-
addPageNumber
public void addPageNumber(int pageNumber) throws IOExceptionAdd a page number to this usage map- Throws:
IOException
-
removePageNumber
public void removePageNumber(int pageNumber) throws IOExceptionRemove a page number from this usage map- Throws:
IOException
-
-