Liferay 6.1.2-ce-ga3

com.liferay.portal.kernel.io.delta
Class RollingChecksum

java.lang.Object
  extended by com.liferay.portal.kernel.io.delta.RollingChecksum

public class RollingChecksum
extends Object


Constructor Summary
RollingChecksum(ReadableByteChannel readableByteChannel, int blockLength)
           
 
Method Summary
 int currentBlockLength()
           
protected  void generateWeakChecksum()
           
 byte getFirstByte()
          Returns the first byte of data in the current block.
 int getPosition()
          Returns the position of the start of the current block in the file.
 boolean hasNext()
           
 void nextBlock()
           
 void nextByte()
           
 byte[] strongChecksum()
          Returns the strong checksum of the current block.
 int weakChecksum()
          Returns the weak checksum of the current block.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RollingChecksum

public RollingChecksum(ReadableByteChannel readableByteChannel,
                       int blockLength)
                throws IOException
Throws:
IOException
Method Detail

currentBlockLength

public int currentBlockLength()

getFirstByte

public byte getFirstByte()
Returns the first byte of data in the current block.


getPosition

public int getPosition()
Returns the position of the start of the current block in the file.


hasNext

public boolean hasNext()
                throws IOException
Throws:
IOException

nextBlock

public void nextBlock()
               throws IOException
Throws:
IOException

nextByte

public void nextByte()
              throws IOException
Throws:
IOException

strongChecksum

public byte[] strongChecksum()
Returns the strong checksum of the current block.


weakChecksum

public int weakChecksum()
Returns the weak checksum of the current block.


generateWeakChecksum

protected void generateWeakChecksum()
                             throws IOException
Throws:
IOException

Liferay 6.1.2-ce-ga3