bytes.copy(input, fixedLength * (long)state.segmentInfo.maxDoc()); final PagedBytes.Reader bytesReader = bytes.freeze(true); CodecUtil.checkEOF(input); success = true; if (!merging) {
@Override public SegmentInfo read(Directory dir, String segment, byte segmentID[], IOContext context) throws IOException { final String fileName = IndexFileNames.segmentFileName(segment, "", Lucene46SegmentInfoFormat.SI_EXTENSION); try (ChecksumIndexInput input = dir.openChecksumInput(fileName, context)) { int codecVersion = CodecUtil.checkHeader(input, Lucene46SegmentInfoFormat.CODEC_NAME, Lucene46SegmentInfoFormat.VERSION_START, Lucene46SegmentInfoFormat.VERSION_CURRENT); final Version version; try { version = Version.parse(input.readString()); } catch (ParseException pe) { throw new CorruptIndexException("unable to parse version string: " + pe.getMessage(), input, pe); } final int docCount = input.readInt(); if (docCount < 0) { throw new CorruptIndexException("invalid docCount: " + docCount, input); } final boolean isCompoundFile = input.readByte() == SegmentInfo.YES; final Map<String,String> diagnostics = Collections.unmodifiableMap(input.readStringStringMap()); final Set<String> files = Collections.unmodifiableSet(input.readStringSet()); if (codecVersion >= Lucene46SegmentInfoFormat.VERSION_CHECKSUM) { CodecUtil.checkFooter(input); } else { CodecUtil.checkEOF(input); } final SegmentInfo si = new SegmentInfo(dir, version, segment, docCount, isCompoundFile, null, diagnostics, null, Collections.<String,String>emptyMap()); si.setFiles(files); return si; } }
CodecUtil.checkFooter(in); } else { CodecUtil.checkEOF(in);
throw new AssertionError(); CodecUtil.checkEOF(input); success = true; } finally {
CodecUtil.checkFooter(in); } else { CodecUtil.checkEOF(in);
final Set<String> files = Collections.unmodifiableSet(input.readStringSet()); CodecUtil.checkEOF(input);
CodecUtil.checkFooter(entriesStream); } else { CodecUtil.checkEOF(entriesStream);
CodecUtil.checkFooter(input); } else { CodecUtil.checkEOF(input);
CodecUtil.checkEOF(input); FieldInfos fieldInfos = new FieldInfos(infos); success = true;
" actual=" + Long.toHexString(checksumNow), input); CodecUtil.checkEOF(input);
" actual=" + Long.toHexString(checksumNow), input); CodecUtil.checkEOF(input);
CodecUtil.checkEOF(input); FieldInfos fieldInfos = new FieldInfos(infos); success = true;
CodecUtil.checkFooter(input); } else { CodecUtil.checkEOF(input);
CodecUtil.checkEOF(indexStream);
CodecUtil.checkFooter(indexStream); } else { CodecUtil.checkEOF(indexStream);