NASA World Wind

gov.nasa.worldwind.ogc.collada.io
Class ColladaInputStream

java.lang.Object
  extended by gov.nasa.worldwind.ogc.collada.io.ColladaInputStream
All Implemented Interfaces:
ColladaDoc

public class ColladaInputStream
extends Object
implements ColladaDoc

Represents a COLLADA document read from an input stream.


Field Summary
protected  InputStream inputStream
          The InputStream specified to the constructor.
protected  URI uri
          The URI of this COLLADA document.
 
Constructor Summary
ColladaInputStream(InputStream sourceStream, URI uri)
          Construct a ColladaInputStream instance.
 
Method Summary
 InputStream getInputStream()
          Returns the input stream reference passed to the constructor.
 String getSupportFilePath(String path)
          Returns an absolute path or URL to a file indicated by a path relative to the COLLADA file's location.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

inputStream

protected InputStream inputStream
The InputStream specified to the constructor.


uri

protected URI uri
The URI of this COLLADA document. May be null.

Constructor Detail

ColladaInputStream

public ColladaInputStream(InputStream sourceStream,
                          URI uri)
                   throws IOException
Construct a ColladaInputStream instance.

Parameters:
sourceStream - the COLLADA stream.
uri - the URI of this COLLADA document. This URI is used to resolve relative references. May be null.
Throws:
IllegalArgumentException - if the specified input stream is null.
IOException - if an error occurs while attempting to read from the stream.
Method Detail

getInputStream

public InputStream getInputStream()
                           throws IOException
Returns the input stream reference passed to the constructor.

Specified by:
getInputStream in interface ColladaDoc
Returns:
the input stream reference passed to the constructor.
Throws:
IOException - if an error occurs while attempting to create or open the input stream.

getSupportFilePath

public String getSupportFilePath(String path)
Returns an absolute path or URL to a file indicated by a path relative to the COLLADA file's location.

Specified by:
getSupportFilePath in interface ColladaDoc
Parameters:
path - the path of the requested file.
Returns:
an absolute path or URL to the file, or null if the file does not exist.

NASA World Wind