public class Segment extends Object
Record data is not kept in memory, but some entries are cached (templates, all strings in the segment).
This class includes method to read records from the raw bytes.
Modifier and Type | Field and Description |
---|---|
static int |
MAX_SEGMENT_SIZE
Maximum segment size.
|
static int |
MEDIUM_LIMIT
The size limit for medium values.
|
static int |
RECORD_ALIGN_BITS
The number of bytes (or bits of address space) to use for the
alignment boundary of segment records.
|
static int |
REF_COUNT_OFFSET |
Constructor and Description |
---|
Segment(SegmentTracker tracker,
SegmentId id,
ByteBuffer data) |
Segment(SegmentTracker tracker,
SegmentId id,
ByteBuffer data,
SegmentVersion version) |
Modifier and Type | Method and Description |
---|---|
long |
getCacheSize() |
List<SegmentId> |
getReferencedIds() |
int |
getRootCount() |
int |
getRootOffset(int index) |
RecordType |
getRootType(int index) |
SegmentId |
getSegmentId() |
int |
size() |
String |
toString() |
void |
writeTo(OutputStream stream)
Writes this segment to the given output stream.
|
public static final int RECORD_ALIGN_BITS
public static final int MAX_SEGMENT_SIZE
public static final int MEDIUM_LIMIT
public static int REF_COUNT_OFFSET
public Segment(SegmentTracker tracker, SegmentId id, ByteBuffer data)
public Segment(SegmentTracker tracker, SegmentId id, ByteBuffer data, SegmentVersion version)
public SegmentId getSegmentId()
public int getRootCount()
public RecordType getRootType(int index)
public int getRootOffset(int index)
public int size()
public long getCacheSize()
public void writeTo(OutputStream stream) throws IOException
stream
- stream to which this segment will be writtenIOException
- on an IO error"Copyright © 2006 - 2015 Adobe Systems Incorporated. All Rights Reserved"