org.apache.lucene.util
Class CodecUtil
java.lang.Object
org.apache.lucene.util.CodecUtil
public final class CodecUtil
- extends Object
Utility class for reading and writing versioned headers.
This is useful to ensure that a file is in the format
you think it is.
- WARNING: This API is experimental and might change in incompatible ways in the next release.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
writeHeader
public static DataOutput writeHeader(DataOutput out,
String codec,
int version)
throws IOException
- Throws:
IOException
headerLength
public static int headerLength(String codec)
checkHeader
public static int checkHeader(DataInput in,
String codec,
int minVersion,
int maxVersion)
throws IOException
- Throws:
IOException