if (scFirst) {
long scIndex = readBuffer.getLong();
// System.out.println("ri " + scIndex);
if (scIndex != chronicle.size())
throw new StreamCorruptedException("Expected index " + chronicle.size() + " but got " + scIndex);
scFirst = false;
}
long size = readBuffer.getInt();
if (size == InProcessChronicleSource.IN_SYNC_LEN) {
// System.out.println("... received inSync");
return false;
}
// System.out.println("size=" + size + " rb " + readBuffer);
if (size > 128 << 20 || size < 0)
throw new StreamCorruptedException("size was " + size);
excerpt.startExcerpt((int) size);
// perform a progressive copy of data.
long remaining = size;
int limit = readBuffer.limit();