Class ChecksumChannel
java.lang.Object
org.gridgain.internal.snapshots.buffer.ChecksumChannel
- All Implemented Interfaces:
Closeable,AutoCloseable,Channel,WritableByteChannel
Delegates writes to a channel and appends a checksum value before closing.
Computes a checksum incrementally, updating only for bytes actually written to the delegate.
-
Constructor Summary
ConstructorsConstructorDescriptionChecksumChannel(WritableByteChannel channel, Checksum checksum, ByteOrder byteOrder) Creates a new checksum channel. -
Method Summary
-
Constructor Details
-
ChecksumChannel
Creates a new checksum channel.- Parameters:
channel- The delegate channel to write to.checksum- The checksum algorithm to use.byteOrder- The byte order for writing the checksum value.
-
-
Method Details
-
write
- Specified by:
writein interfaceWritableByteChannel- Throws:
IOException
-
isOpen
public boolean isOpen() -
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceChannel- Specified by:
closein interfaceCloseable- Throws:
IOException
-