opennlp.model
Class HashSumEventStream
java.lang.Object
opennlp.model.HashSumEventStream
- All Implemented Interfaces:
- EventStream
public class HashSumEventStream
- extends Object
- implements EventStream
Method Summary |
BigInteger |
calculateHashSum()
Calculates the hash sum of the stream. |
boolean |
hasNext()
Test whether there are any Events remaining in this EventStream. |
Event |
next()
Returns the next Event object held in this EventStream. |
void |
remove()
|
HashSumEventStream
public HashSumEventStream(EventStream eventStream)
hasNext
public boolean hasNext()
throws IOException
- Description copied from interface:
EventStream
- Test whether there are any Events remaining in this EventStream.
- Specified by:
hasNext
in interface EventStream
- Returns:
- true if this EventStream has more Events
- Throws:
IOException
next
public Event next()
throws IOException
- Description copied from interface:
EventStream
- Returns the next Event object held in this EventStream.
- Specified by:
next
in interface EventStream
- Returns:
- the Event object which is next in this 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 © 2011 The Apache Software Foundation. All Rights Reserved.