Class ColladaInputStream
- java.lang.Object
-
- gov.nasa.worldwind.ogc.collada.io.ColladaInputStream
-
- All Implemented Interfaces:
ColladaDoc
public class ColladaInputStream extends java.lang.Object implements ColladaDoc
Represents a COLLADA document read from an input stream.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.io.InputStream
inputStream
TheInputStream
specified to the constructor.protected java.net.URI
uri
The URI of this COLLADA document.
-
Constructor Summary
Constructors Constructor Description ColladaInputStream(java.io.InputStream sourceStream, java.net.URI uri)
Construct aColladaInputStream
instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.io.InputStream
getInputStream()
Returns the input stream reference passed to the constructor.java.lang.String
getSupportFilePath(java.lang.String path)
Returns an absolute path or URL to a file indicated by a path relative to the COLLADA file's location.
-
-
-
Constructor Detail
-
ColladaInputStream
public ColladaInputStream(java.io.InputStream sourceStream, java.net.URI uri) throws java.io.IOException
Construct aColladaInputStream
instance.- Parameters:
sourceStream
- the COLLADA stream.uri
- the URI of this COLLADA document. This URI is used to resolve relative references. May benull
.- Throws:
java.lang.IllegalArgumentException
- if the specified input stream is null.java.io.IOException
- if an error occurs while attempting to read from the stream.
-
-
Method Detail
-
getInputStream
public java.io.InputStream getInputStream() throws java.io.IOException
Returns the input stream reference passed to the constructor.- Specified by:
getInputStream
in interfaceColladaDoc
- Returns:
- the input stream reference passed to the constructor.
- Throws:
java.io.IOException
- if an error occurs while attempting to create or open the input stream.
-
getSupportFilePath
public java.lang.String getSupportFilePath(java.lang.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 interfaceColladaDoc
- 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.
-
-