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.IOException
public ChecksumValidator(ChecksumType checksumType, RandomAccessReader reader, java.lang.String dataFilename) throws java.io.IOException
java.io.IOException
protected 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.IOException
public void validate(java.nio.ByteBuffer buffer) throws java.io.IOException
java.io.IOException
public void close()
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
Copyright © 2009-2022 The Apache Software Foundation