Package org.rostore.v2.keys
Class RecordLengths
java.lang.Object
org.rostore.v2.keys.RecordLengths
Defines the lengths of the key record components in bytes
-
Constructor Summary
ConstructorDescriptionRecordLengths
(int idLength, int eolLength, int versionLength) Initializes the record lengths manually -
Method Summary
Modifier and TypeMethodDescriptionint
The length of the end of life element for every key entryint
The length of the id element for every key entryint
The length of all elements of recordint
The length of the version element for every key elementstatic final RecordLengths
standardRecordLengths
(MediaProperties mediaProperties) Initializes the record length with the standard
-
Constructor Details
-
RecordLengths
public RecordLengths(int idLength, int eolLength, int versionLength) Initializes the record lengths manually- Parameters:
idLength
- the length of the id element for every key entryeolLength
- the length of the end of life element for every key entryversionLength
- the length of the version element for every key element
-
-
Method Details
-
standardRecordLengths
Initializes the record length with the standard- Parameters:
mediaProperties
- the properties of the media- Returns:
- the object with length
-
getIdLength
public int getIdLength()The length of the id element for every key entry- Returns:
- the length in bytes
-
getEolLength
public int getEolLength()The length of the end of life element for every key entry- Returns:
- the length in bytes
-
getVersionLength
public int getVersionLength()The length of the version element for every key element- Returns:
- the length in bytes
-
getTotalLength
public int getTotalLength()The length of all elements of record- Returns:
- the length in bytes
-