Class DataIntegrityMetadata.ChecksumValidator

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable
    Enclosing class:
    DataIntegrityMetadata

    public static class DataIntegrityMetadata.ChecksumValidator
    extends java.lang.Object
    implements java.io.Closeable
    • Field Detail

      • chunkSize

        public final int chunkSize
    • Constructor Detail

      • ChecksumValidator

        public ChecksumValidator​(Descriptor descriptor)
                          throws java.io.IOException
        Throws:
        java.io.IOException
      • ChecksumValidator

        public ChecksumValidator​(ChecksumType checksumType,
                                 RandomAccessReader reader,
                                 java.lang.String dataFilename)
                          throws java.io.IOException
        Throws:
        java.io.IOException
    • Method Detail

      • seek

        public void seek​(long offset)
      • chunkStart

        public long chunkStart​(long offset)
      • validate

        public void validate​(byte[] bytes,
                             int start,
                             int end)
                      throws java.io.IOException
        Throws:
        java.io.IOException
      • validate

        public void validate​(java.nio.ByteBuffer buffer)
                      throws java.io.IOException
        validates the checksum with the bytes from the specified buffer. Upon return, the buffer's position will be updated to its limit; its limit will not have been changed.
        Throws:
        java.io.IOException
      • close

        public void close()
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable