iicm.vrml.pw
Class VRMLparser

java.lang.Object
  |
  +--iicm.vrml.pw.VRMLparser

public class VRMLparser
extends java.lang.Object

VRMLparser - VRML parser class


Constructor Summary
VRMLparser(java.io.InputStream input)
          create VRMLparser for specific input stream to read from. (underlying parser buffers input stream itself.)
VRMLparser(java.io.InputStream input, iicm.vrml.pw.ParserOutput po)
          VRMLparser constructor with message callbacks
 
Method Summary
 java.util.Hashtable getNodeNames()
           
 float getVersion()
          get VRML version; only valid after checkHeader or setVersion
 boolean isMovingWorlds()
          this parser is currently designed for VRML 2.0 only; this method could be used to distinguish Moving World Scenes from VRML 1.0
 GroupNode readBody()
          read VRML body should not be called before readHeader or setVersion
 float readHeader()
          check header of VRML data stream
 GroupNode readStream()
          parse complete VRML stream (header + body)
 void setVersion(float ver)
          set VRML version for headerless VRML stream
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VRMLparser

public VRMLparser(java.io.InputStream input)
create VRMLparser for specific input stream to read from. (underlying parser buffers input stream itself.) Note: will not return before 1st byte of InputStream is read (blocks)

VRMLparser

public VRMLparser(java.io.InputStream input,
                  iicm.vrml.pw.ParserOutput po)
VRMLparser constructor with message callbacks
Method Detail

setVersion

public void setVersion(float ver)
set VRML version for headerless VRML stream

getVersion

public float getVersion()
get VRML version; only valid after checkHeader or setVersion

isMovingWorlds

public boolean isMovingWorlds()
this parser is currently designed for VRML 2.0 only; this method could be used to distinguish Moving World Scenes from VRML 1.0
Returns:
flag, whether data is in Moving Worlds (VRML 2.0) format

readStream

public GroupNode readStream()
parse complete VRML stream (header + body)
Returns:
root node
See Also:

readHeader

public float readHeader()
check header of VRML data stream
Returns:
VRML version identifier or 0 on failure

readBody

public GroupNode readBody()
read VRML body should not be called before readHeader or setVersion

getNodeNames

public java.util.Hashtable getNodeNames()