NASA World Wind

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

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

public class ColladaFile
extends Object
implements ColladaDoc

Represents a COLLADA document read from a file.


Field Summary
protected  File colladaFile
          File from which COLLADA content is read.
 
Constructor Summary
ColladaFile(File file)
          Create a new instance from a file.
 
Method Summary
 InputStream getInputStream()
          Returns an InputStream to the associated COLLADA document.
 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

colladaFile

protected File colladaFile
File from which COLLADA content is read.

Constructor Detail

ColladaFile

public ColladaFile(File file)
Create a new instance from a file.

Parameters:
file - COLLADA file from which to read content.
Method Detail

getInputStream

public InputStream getInputStream()
                           throws IOException
Returns an InputStream to the associated COLLADA document.

Implementations of this interface do not close the stream; the user of the class must close the stream.

Specified by:
getInputStream in interface ColladaDoc
Returns:
an input stream positioned to the head of the COLLADA document.
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