org.apache.archiva.checksum
Class Checksum

java.lang.Object
  extended by org.apache.archiva.checksum.Checksum

public class Checksum
extends Object

Checksum - simple checksum hashing routines.


Field Summary
private static int BUFFER_SIZE
           
private  ChecksumAlgorithm checksumAlgorithm
           
protected  MessageDigest md
           
 
Constructor Summary
Checksum(ChecksumAlgorithm checksumAlgorithm)
           
 
Method Summary
 ChecksumAlgorithm getAlgorithm()
           
 String getChecksum()
           
 void reset()
           
 Checksum update(byte[] buffer, int offset, int size)
           
 Checksum update(InputStream stream)
           
static void update(List<Checksum> checksums, InputStream stream)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BUFFER_SIZE

private static final int BUFFER_SIZE
See Also:
Constant Field Values

md

protected final MessageDigest md

checksumAlgorithm

private ChecksumAlgorithm checksumAlgorithm
Constructor Detail

Checksum

public Checksum(ChecksumAlgorithm checksumAlgorithm)
Method Detail

update

public static void update(List<Checksum> checksums,
                          InputStream stream)
                   throws IOException
Throws:
IOException

getChecksum

public String getChecksum()

getAlgorithm

public ChecksumAlgorithm getAlgorithm()

reset

public void reset()

update

public Checksum update(byte[] buffer,
                       int offset,
                       int size)

update

public Checksum update(InputStream stream)
                throws IOException
Throws:
IOException


Copyright © 2006-2013 The Apache Software Foundation. All Rights Reserved.