public class SimpleTextSegmentInfoFormat extends SegmentInfoFormat
FOR RECREATIONAL USE ONLY
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
SI_EXTENSION |
Constructor and Description |
---|
SimpleTextSegmentInfoFormat() |
Modifier and Type | Method and Description |
---|---|
SegmentInfo |
read(Directory directory,
java.lang.String segmentName,
byte[] segmentID,
IOContext context)
Read
SegmentInfo data from a directory. |
void |
write(Directory dir,
SegmentInfo si,
IOContext ioContext)
Write
SegmentInfo data. |
public static final java.lang.String SI_EXTENSION
public SegmentInfo read(Directory directory, java.lang.String segmentName, byte[] segmentID, IOContext context) throws java.io.IOException
SegmentInfoFormat
SegmentInfo
data from a directory.read
in class SegmentInfoFormat
directory
- directory to read fromsegmentName
- name of the segment to readsegmentID
- expected identifier for the segmentjava.io.IOException
- If an I/O error occurspublic void write(Directory dir, SegmentInfo si, IOContext ioContext) throws java.io.IOException
SegmentInfoFormat
SegmentInfo
data.
The codec must add its SegmentInfo filename(s) to info
before doing i/o.write
in class SegmentInfoFormat
java.io.IOException
- If an I/O error occursCopyright © 2000–2019 The Apache Software Foundation. All rights reserved.