uk.me.nxg.xoxa.esis
Class MessageDigestEsisWriter

java.lang.Object
  extended by uk.me.nxg.xoxa.esis.MessageDigestEsisWriter
All Implemented Interfaces:
EsisWriter

public class MessageDigestEsisWriter
extends Object
implements EsisWriter

Calculates a message digest of a stream.


Constructor Summary
MessageDigestEsisWriter(String digestName)
          Create a new EsisWriter instance, which creates a message digest of the given type.
 
Method Summary
 void close()
           
 String getAlgorithm()
          Returns the canonical name of the message digest algorithm used.
 byte[] getDigest()
          Returns the accumulated message digest.
 String getDigestAsString()
          Returns the accumulated message digest, as a hex string.
 EsisWriter print(char c)
           
 EsisWriter print(String s)
           
 EsisWriter println()
           
 EsisWriter println(char c)
           
 EsisWriter println(String s)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MessageDigestEsisWriter

public MessageDigestEsisWriter(String digestName)
                        throws NoSuchAlgorithmException
Create a new EsisWriter instance, which creates a message digest of the given type.

Throws:
NoSuchAlgorithmException
Method Detail

getDigest

public byte[] getDigest()
Returns the accumulated message digest.


getDigestAsString

public String getDigestAsString()
Returns the accumulated message digest, as a hex string.


getAlgorithm

public String getAlgorithm()
Returns the canonical name of the message digest algorithm used.


print

public EsisWriter print(String s)
                 throws IOException
Specified by:
print in interface EsisWriter
Throws:
IOException

print

public EsisWriter print(char c)
                 throws IOException
Specified by:
print in interface EsisWriter
Throws:
IOException

println

public EsisWriter println()
                   throws IOException
Specified by:
println in interface EsisWriter
Throws:
IOException

println

public EsisWriter println(String s)
                   throws IOException
Specified by:
println in interface EsisWriter
Throws:
IOException

println

public EsisWriter println(char c)
                   throws IOException
Specified by:
println in interface EsisWriter
Throws:
IOException

close

public void close()
Specified by:
close in interface EsisWriter


Copyright © 2015. All rights reserved.