public static class DataIntegrityMetadata.ChecksumValidator
extends java.lang.Object
implements java.io.Closeable
| Modifier and Type | Field and Description |
|---|---|
int |
chunkSize |
| Modifier | Constructor and Description |
|---|---|
protected |
ChecksumValidator(ChecksumType checksumType,
RandomAccessReader reader,
int chunkSize) |
|
ChecksumValidator(ChecksumType checksumType,
RandomAccessReader reader,
java.lang.String dataFilename) |
|
ChecksumValidator(Descriptor descriptor) |
| Modifier and Type | Method and Description |
|---|---|
long |
chunkStart(long offset) |
void |
close() |
void |
seek(long offset) |
void |
validate(byte[] bytes,
int start,
int end) |
void |
validate(java.nio.ByteBuffer buffer)
validates the checksum with the bytes from the specified buffer.
|
public ChecksumValidator(Descriptor descriptor) throws java.io.IOException
java.io.IOExceptionpublic ChecksumValidator(ChecksumType checksumType, RandomAccessReader reader, java.lang.String dataFilename) throws java.io.IOException
java.io.IOExceptionprotected ChecksumValidator(ChecksumType checksumType, RandomAccessReader reader, int chunkSize)
public void seek(long offset)
public long chunkStart(long offset)
public void validate(byte[] bytes,
int start,
int end)
throws java.io.IOException
java.io.IOExceptionpublic void validate(java.nio.ByteBuffer buffer)
throws java.io.IOException
java.io.IOExceptionpublic void close()
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableCopyright © 2009-2020 The Apache Software Foundation