Jive Forums API (5.5.20.2-oracle) Developer Javadocs

com.jivesoftware.forum.nntp.spi
Class UUBeginIterator

java.lang.Object
  extended by com.jivesoftware.forum.nntp.spi.PeekIterator
      extended by com.jivesoftware.forum.nntp.spi.UUBeginIterator
All Implemented Interfaces:
java.util.Iterator

public class UUBeginIterator
extends PeekIterator

Iterator that continues until the underlying iterator runs out or a uuencoding 'begin' token is seen.


Constructor Summary
UUBeginIterator(java.util.Iterator itr)
          Create an iterator that wraps the given one.
 
Method Summary
 java.lang.String getHeader()
          Returns the uuencode header line if the last call to hasNext() returned false.
 java.lang.String getName()
          Returns the name of the uuencoded file if the last call to hasNext() returned false.
 boolean hasNext()
          Tests whether another line exists before the uuencoding start section.
 java.lang.Object next()
          Returns the next element and moves the iterator forward.
 java.lang.Object peek()
          Peeks into the next element without iterating.
 
Methods inherited from class com.jivesoftware.forum.nntp.spi.PeekIterator
remove
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UUBeginIterator

public UUBeginIterator(java.util.Iterator itr)
Create an iterator that wraps the given one.

Parameters:
itr - the iterator to wrap
Method Detail

getName

public java.lang.String getName()
Returns the name of the uuencoded file if the last call to hasNext() returned false. The call returns null in all other states.

Returns:
the name of the uuencoded file or null if iterator not on begin line

getHeader

public java.lang.String getHeader()
Returns the uuencode header line if the last call to hasNext() returned false. The call returns null in all other states.

Returns:
the header line of the uuencoded section or null if iterator not on begin line

hasNext

public boolean hasNext()
Tests whether another line exists before the uuencoding start section.

Specified by:
hasNext in interface java.util.Iterator
Overrides:
hasNext in class PeekIterator
Returns:
True if another line can be read.

next

public java.lang.Object next()
Description copied from class: PeekIterator
Returns the next element and moves the iterator forward.

Specified by:
next in interface java.util.Iterator
Overrides:
next in class PeekIterator
Returns:
The next element of the iterator

peek

public java.lang.Object peek()
Description copied from class: PeekIterator
Peeks into the next element without iterating. Essentially the same as the normal Iterator.next() method minus the side effect of moving the iterator.

Overrides:
peek in class PeekIterator
Returns:
The next element of the iterator

Jive Forums Project Page

Copyright © 1999-2006 Jive Software.