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