text: public static void writeHeader(DataOutput out, String codec, int version) throws IOException {BytesRef bytes = new BytesRef(codec);if (bytes.length != codec.length() || bytes.length >= 128) {throw new IllegalArgumentException("codec must be simple ASCII, less than 128 characters in length [got " + codec + "]");}out.writeInt(CODEC_MAGIC);out.writeString(codec);out.writeInt(version);}