public abstract class SegmentInfoFormat extends Object
SegmentInfo
(segment metadata file).SegmentInfo
Modifier | Constructor and Description |
---|---|
protected |
SegmentInfoFormat()
Sole constructor.
|
Modifier and Type | Method and Description |
---|---|
abstract SegmentInfo |
read(Directory directory,
String segmentName,
byte[] segmentID,
IOContext context)
Read
SegmentInfo data from a directory. |
abstract void |
write(Directory dir,
SegmentInfo info,
IOContext ioContext)
Write
SegmentInfo data. |
protected SegmentInfoFormat()
public abstract SegmentInfo read(Directory directory, String segmentName, byte[] segmentID, IOContext context) throws IOException
SegmentInfo
data from a directory.directory
- directory to read fromsegmentName
- name of the segment to readsegmentID
- expected identifier for the segmentIOException
- If an I/O error occurspublic abstract void write(Directory dir, SegmentInfo info, IOContext ioContext) throws IOException
SegmentInfo
data.
The codec must add its SegmentInfo filename(s) to info
before doing i/o.IOException
- If an I/O error occursCopyright © 2000-2017 Apache Software Foundation. All Rights Reserved.