java.lang.Object
org.xbib.rpm.header.entry.AbstractSpecEntry<T>
- Type Parameters:
T- the type parameter
- All Implemented Interfaces:
SpecEntry<T>
- Direct Known Subclasses:
BinSpecEntry,Int16SpecEntry,Int32SpecEntry,Int64SpecEntry,Int8SpecEntry,StringSpecEntry
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintgetOffset(int offset) abstract intgetType()voidincCount(int count) voidindex(ByteBuffer index, int position) Writes the index entry into the provided buffer at the current position.abstract voidread(ByteBuffer buffer) Reads this entries value from the provided buffer using the set count.booleanready()voidsetCount(int count) voidsetEntryType(EntryType entryType) voidsetOffset(int offset) voidsetSize(int size) voidabstract intsize()Returns the size this entry will need in the provided data buffer to write it's contents, corrected for any trailing zeros to fill to a boundary.toString()abstract voidwrite(ByteBuffer data) Writes this entries index to the index buffer and its values to the output channel provided.
-
Field Details
-
size
protected int size -
entryType
-
count
protected int count -
offset
protected int offset -
values
-
-
Constructor Details
-
AbstractSpecEntry
public AbstractSpecEntry()
-
-
Method Details
-
getEntryType
- Specified by:
getEntryTypein interfaceSpecEntry<T>
-
setEntryType
- Specified by:
setEntryTypein interfaceSpecEntry<T>
-
setSize
public void setSize(int size) -
setCount
public void setCount(int count) -
incCount
public void incCount(int count) -
setOffset
public void setOffset(int offset) -
getValues
-
setValues
-
getOffset
public int getOffset(int offset) -
ready
public boolean ready() -
getType
public abstract int getType() -
size
public abstract int size()Returns the size this entry will need in the provided data buffer to write it's contents, corrected for any trailing zeros to fill to a boundary. -
read
Reads this entries value from the provided buffer using the set count. -
write
Writes this entries index to the index buffer and its values to the output channel provided. -
index
Writes the index entry into the provided buffer at the current position. -
toString
-