Package org.deepsymmetry.cratedigger.pdb
Class RekordboxPdb.Page
- java.lang.Object
-
- io.kaitai.struct.KaitaiStruct
-
- org.deepsymmetry.cratedigger.pdb.RekordboxPdb.Page
-
- Enclosing class:
- RekordboxPdb
public static class RekordboxPdb.Page extends io.kaitai.struct.KaitaiStruct
A table page, consisting of a short header describing the content of the page and linking to the next page, followed by a heap in which row data is found. At the end of the page there is an index which locates all rows present in the heap via their offsets past the end of the page header.
-
-
Constructor Summary
Constructors Constructor Description Page(io.kaitai.struct.KaitaiStream _io)
Page(io.kaitai.struct.KaitaiStream _io, RekordboxPdb.PageRef _parent)
Page(io.kaitai.struct.KaitaiStream _io, RekordboxPdb.PageRef _parent, RekordboxPdb _root)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description RekordboxPdb.PageRef
_parent()
RekordboxPdb
_root()
int
_unnamed12()
int
_unnamed14()
int
_unnamed15()
long
_unnamed4()
byte[]
_unnamed5()
int
_unnamed7()
int
_unnamed8()
int
freeSize()
Unused space (in bytes) in the page heap, excluding the row index at end of page.static RekordboxPdb.Page
fromFile(String fileName)
byte[]
gap()
Only exposed until https://github.com/kaitai-io/kaitai_struct/issues/825 can be fixed.byte[]
heap()
Integer
heapPos()
Boolean
isDataPage()
RekordboxPdb.PageRef
nextPage()
Index of the next page containing this type of rows.Integer
numGroups()
The number of row groups that are present in the index.Integer
numRows()
The number of rows on this page (controls the number of row index entries there are, but some of those may not be marked as present in the table due to deletion).int
numRowsLarge()
Holds the value used for `num_rows` (as described above) when that is too large to fit into `num_rows_small`, and that situation seems to be indicated when this value is larger than `num_rows_small`, but not equal to `0x1fff`.int
numRowsSmall()
Holds the value used for `num_rows` (see below) unless `num_rows_large` is larger (but not equal to `0x1fff`).int
pageFlags()
long
pageIndex()
Matches the index we used to look up the page, sanity check?ArrayList<RekordboxPdb.RowGroup>
rowGroups()
The actual row groups making up the row index.RekordboxPdb.PageType
type()
Identifies the type of information stored in the rows of this page.int
usedSize()
The number of bytes that are in use in the page heap.
-
-
-
Constructor Detail
-
Page
public Page(io.kaitai.struct.KaitaiStream _io)
-
Page
public Page(io.kaitai.struct.KaitaiStream _io, RekordboxPdb.PageRef _parent)
-
Page
public Page(io.kaitai.struct.KaitaiStream _io, RekordboxPdb.PageRef _parent, RekordboxPdb _root)
-
-
Method Detail
-
fromFile
public static RekordboxPdb.Page fromFile(String fileName) throws IOException
- Throws:
IOException
-
numRows
public Integer numRows()
The number of rows on this page (controls the number of row index entries there are, but some of those may not be marked as present in the table due to deletion).
-
numGroups
public Integer numGroups()
The number of row groups that are present in the index. Each group can hold up to sixteen rows. All but the final one will hold sixteen rows.
-
rowGroups
public ArrayList<RekordboxPdb.RowGroup> rowGroups()
The actual row groups making up the row index. Each group can hold up to sixteen rows. Non-data pages do not have actual rows, and attempting to parse them can crash.
-
heapPos
public Integer heapPos()
-
isDataPage
public Boolean isDataPage()
-
gap
public byte[] gap()
Only exposed until https://github.com/kaitai-io/kaitai_struct/issues/825 can be fixed.
-
pageIndex
public long pageIndex()
Matches the index we used to look up the page, sanity check?
-
type
public RekordboxPdb.PageType type()
Identifies the type of information stored in the rows of this page.
-
nextPage
public RekordboxPdb.PageRef nextPage()
Index of the next page containing this type of rows. Points past the end of the file if there are no more.
-
_unnamed4
public long _unnamed4()
-
_unnamed5
public byte[] _unnamed5()
-
numRowsSmall
public int numRowsSmall()
Holds the value used for `num_rows` (see below) unless `num_rows_large` is larger (but not equal to `0x1fff`). This seems like some strange mechanism to deal with the fact that lots of tiny entries, such as are found in the `playlist_entries` table, are too big to count with a single byte. But why not just always use `num_rows_large`, then?
-
_unnamed7
public int _unnamed7()
-
_unnamed8
public int _unnamed8()
-
pageFlags
public int pageFlags()
-
freeSize
public int freeSize()
Unused space (in bytes) in the page heap, excluding the row index at end of page.
-
usedSize
public int usedSize()
The number of bytes that are in use in the page heap.
-
_unnamed12
public int _unnamed12()
-
numRowsLarge
public int numRowsLarge()
Holds the value used for `num_rows` (as described above) when that is too large to fit into `num_rows_small`, and that situation seems to be indicated when this value is larger than `num_rows_small`, but not equal to `0x1fff`. This seems like some strange mechanism to deal with the fact that lots of tiny entries, such as are found in the `playlist_entries` table, are too big to count with a single byte. But why not just always use this value, then?
-
_unnamed14
public int _unnamed14()
-
_unnamed15
public int _unnamed15()
-
heap
public byte[] heap()
-
_root
public RekordboxPdb _root()
-
_parent
public RekordboxPdb.PageRef _parent()
- Overrides:
_parent
in classio.kaitai.struct.KaitaiStruct
-
-