CodecUtil (Lucene 3.6.2 API)
Keywords: org.apache.lucene.util.CodecUtil class

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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.

Method Summary
`static int` | `checkHeader(DataInput in, String codec, int minVersion, int maxVersion)`
`static int` | `headerLength(String codec)`
`static DataOutput` | `writeHeader(DataOutput out, String codec, int version)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### 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`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD