Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -242,11 +242,13 @@ public static MD5MD5Crc32FileChecksumProto convert(
DataOutputBuffer buf = new DataOutputBuffer();
checksum.write(buf);
byte[] bytes = buf.getData();
DataInputBuffer buffer = new DataInputBuffer();
buffer.reset(bytes, 0, bytes.length);
int bytesPerCRC = buffer.readInt();
long crcPerBlock = buffer.readLong();
buffer.close();
int bytesPerCRC;
long crcPerBlock;
try (DataInputBuffer buffer = new DataInputBuffer()) {
buffer.reset(bytes, 0, bytes.length);
bytesPerCRC = buffer.readInt();
crcPerBlock = buffer.readLong();
}

int offset = Integer.BYTES + Long.BYTES;
ByteString byteString = ByteString.copyFrom(
Expand Down