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 Summary

      Fields 
      Modifier and Type Field Description
      int chunkSize  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method 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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • chunkSize

        public final int chunkSize
    • Constructor Detail

      • ChecksumValidator

        public ChecksumValidator​(File dataFile,
                                 File crcFile)
                          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