private final int snapshotChunkSize;
private final String logName;
private ByteSource snapshotBytes;
private final int snapshotChunkSize;
private final String logName;
private ByteSource snapshotBytes;
// if replyStatus is false, the previous chunk is attempted
private boolean replyStatus = false;
private int chunkIndex = FIRST_CHUNK_INDEX;
// if replyStatus is false, the previous chunk is attempted
private boolean replyStatus = false;
private int chunkIndex = FIRST_CHUNK_INDEX;
- int incrementOffset() {
- // if offset is -1 doesnt matter whether it was the initial value or reset, move the offset to 0 to begin with
+ private long incrementOffset() {
+ // if offset is -1 doesn't matter whether it was the initial value or reset, move the offset to 0 to begin with
byte[] getNextChunk() throws IOException {
// increment offset to indicate next chunk is in flight, canSendNextChunk() wont let us hit this again until,
// markSendStatus() is called with either success or failure
byte[] getNextChunk() throws IOException {
// increment offset to indicate next chunk is in flight, canSendNextChunk() wont let us hit this again until,
// markSendStatus() is called with either success or failure
if (replyStatus || currentChunk == null) {
int size = snapshotChunkSize;
if (snapshotChunkSize > snapshotSize) {
if (replyStatus || currentChunk == null) {
int size = snapshotChunkSize;
if (snapshotChunkSize > snapshotSize) {
- "The # of bytes read from the input stream, %d,"
- + "does not match the expected # %d", numRead, size));
+ "The # of bytes read from the input stream, %d, does not match the expected # %d",
+ numRead, size));