opennlp.tools.util
Class HashSumEventStream

java.lang.Object
  extended by opennlp.tools.util.HashSumEventStream
All Implemented Interfaces:
opennlp.model.EventStream

public class HashSumEventStream
extends Object
implements opennlp.model.EventStream


Constructor Summary
HashSumEventStream(opennlp.model.EventStream eventStream)
           
 
Method Summary
 BigInteger calculateHashSum()
          Calculates the hash sum of the stream.
 boolean hasNext()
           
 opennlp.model.Event next()
           
 void remove()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HashSumEventStream

public HashSumEventStream(opennlp.model.EventStream eventStream)
Method Detail

hasNext

public boolean hasNext()
                throws IOException
Specified by:
hasNext in interface opennlp.model.EventStream
Throws:
IOException

next

public opennlp.model.Event next()
                         throws IOException
Specified by:
next in interface opennlp.model.EventStream
Throws:
IOException

calculateHashSum

public BigInteger calculateHashSum()
Calculates the hash sum of the stream. The method must be called after the stream is completely consumed.

Returns:
the hash sum
Throws:
IllegalStateException - if the stream is not consumed completely, completely means that hasNext() returns false

remove

public void remove()


Copyright © 2010. All Rights Reserved.