org.smurn.jply
Interface ElementReader


public interface ElementReader

Reads a stream of elements.


Method Summary
 void close()
          Closes this stream.
 int getCount()
          Total number of elements provided by this stream.
 ElementType getElementType()
          The element type of all elements read by this stream.
 boolean isClosed()
          Checks if this stream is closed.
 Element readElement()
          Reads the next element.
 

Method Detail

getElementType

ElementType getElementType()
The element type of all elements read by this stream.

Returns:
Element type of all elements. Never null.

getCount

int getCount()
Total number of elements provided by this stream.

This is equivalent to PlyReader.getElementCount(...).

Returns:
Number of elements.

readElement

Element readElement()
                    throws IOException
Reads the next element.

Returns:
The next element or null if there are no more elements.
Throws:
IOException - if reading fails.
IllegalStateException - if the stream is closed.

close

void close()
           throws IOException
Closes this stream.

Throws:
IOException - if closing the stream fails.

isClosed

boolean isClosed()
Checks if this stream is closed.

Returns:
true if the stream was closed already.


Copyright © 2011. All Rights Reserved.