de.jreality.reader
Class AbstractReader

java.lang.Object
  extended by de.jreality.reader.AbstractReader
All Implemented Interfaces:
SceneReader
Direct Known Subclasses:
DemoReader, Reader3DS, ReaderFE, ReaderJRS, ReaderJVX, ReaderLAS, ReaderMATHEMATICA, ReaderMESH, ReaderMSMS, ReaderOBJ, ReaderOOGL, ReaderPOLY, ReaderPOV, ReaderPTS, ReaderSTL, ReaderVRML

public abstract class AbstractReader
extends Object
implements SceneReader

Abstract class for a SceneReader. Implement setInput so that the Input is processed and the component assigned to root.


Constructor Summary
AbstractReader()
           
 
Method Summary
 SceneGraphComponent getComponent()
          provides the root component for the scene that was read.
 SceneGraphComponent read(File input)
          convenience method for reading a File.
 SceneGraphComponent read(Input input)
          convenience method for reading from an Input.
 SceneGraphComponent read(URL input)
          convenience method for reading from a URL.
 void setInput(Input input)
          set the input to read the scene from
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractReader

public AbstractReader()
Method Detail

setInput

public void setInput(Input input)
              throws IOException
Description copied from interface: SceneReader
set the input to read the scene from

Specified by:
setInput in interface SceneReader
Parameters:
input - the Input of the resource to read.
Throws:
IOException

getComponent

public SceneGraphComponent getComponent()
Description copied from interface: SceneReader
provides the root component for the scene that was read.

Specified by:
getComponent in interface SceneReader
Returns:
the root of the read scene.

read

public SceneGraphComponent read(Input input)
                         throws IOException
convenience method for reading from an Input.

Parameters:
input - the input
Returns:
the root component of the scenegraph created from the input
Throws:
IOException

read

public SceneGraphComponent read(URL input)
                         throws IOException
convenience method for reading from a URL.

Parameters:
input - the input URL
Returns:
the root component of the scenegraph created from the input
Throws:
IOException

read

public SceneGraphComponent read(File input)
                         throws IOException
convenience method for reading a File.

Parameters:
input - the input file
Returns:
the root component of the scenegraph created from the input
Throws:
IOException