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
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

md

protected final MessageDigest md
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-2012 The Apache Software Foundation. All Rights Reserved.