CodeBeamer 5.4.0.1-RC API

com.intland.codebeamer.utils
Class StreamDigester

java.lang.Object
  extended by com.intland.codebeamer.utils.StreamDigester

public class StreamDigester
extends java.lang.Object


Constructor Summary
StreamDigester()
          Create a default StreamDigester that creates MD5 checksums
StreamDigester(java.lang.String algorithm)
          Create a new StreamDigester that creates checksums with the specified algorithm
 
Method Summary
 java.lang.String createCheckSum(byte[] bytes)
           
 java.lang.String createCheckSum(java.io.File file)
           
 java.lang.String createCheckSum(java.io.InputStream fis)
           
 java.lang.String createCheckSum(java.lang.String filename)
           
static java.lang.String digest2String(byte[] digest)
           
 java.lang.String getAlgorithm()
           
 void setAlgorithm(java.lang.String algorithm)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StreamDigester

public StreamDigester()
Create a default StreamDigester that creates MD5 checksums


StreamDigester

public StreamDigester(java.lang.String algorithm)
Create a new StreamDigester that creates checksums with the specified algorithm

Parameters:
algorithm - is the MessageDigest algorithm to use
Method Detail

createCheckSum

public java.lang.String createCheckSum(java.lang.String filename)
                                throws java.io.IOException
Throws:
java.io.IOException

createCheckSum

public java.lang.String createCheckSum(java.io.File file)
                                throws java.io.IOException
Throws:
java.io.IOException

createCheckSum

public java.lang.String createCheckSum(java.io.InputStream fis)
                                throws java.io.IOException
Throws:
java.io.IOException

createCheckSum

public java.lang.String createCheckSum(byte[] bytes)
                                throws java.security.NoSuchAlgorithmException
Throws:
java.security.NoSuchAlgorithmException

digest2String

public static java.lang.String digest2String(byte[] digest)

getAlgorithm

public java.lang.String getAlgorithm()
Returns:
the algorithm

setAlgorithm

public void setAlgorithm(java.lang.String algorithm)
Parameters:
algorithm - the algorithm to set

CodeBeamer 5.4.0.1-RC API

Copyright © 2006-2009 Intland Software. All rights reserved.