Module de.carne
Package de.carne.io

Interface Checksum

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      byte[] getValue()
      Finalizes the checksum generation, returns the result and resets the generator.
      void reset()
      Resets the generator to it's start state.
      void update​(byte b)
      Feeds a single byte into the generator.
      void update​(byte[] bs)
      Feeds a byte array into the generator.
      void update​(byte[] bs, int off, int len)
      Feeds a byte array into the generator.
      void update​(java.nio.ByteBuffer bs)
      Feeds a ByteBuffer into the generator.
    • Method Detail

      • reset

        void reset()
        Resets the generator to it's start state.
      • update

        void update​(byte b)
        Feeds a single byte into the generator.
        Parameters:
        b - the byte to feed.
      • update

        void update​(byte[] bs)
        Feeds a byte array into the generator.
        Parameters:
        bs - the byte array to feed.
      • update

        void update​(byte[] bs,
                    int off,
                    int len)
        Feeds a byte array into the generator.
        Parameters:
        bs - the byte array to feed.
        off - the first byte to feed.
        len - the number of bytes to feed.
      • update

        void update​(java.nio.ByteBuffer bs)
        Feeds a ByteBuffer into the generator.
        Parameters:
        bs - the ByteBuffer to feed.
      • getValue

        byte[] getValue()
        Finalizes the checksum generation, returns the result and resets the generator.
        Returns:
        the generated checksum.