Class 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
      The InputStream 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 a ColladaInputStream 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.
      • Methods inherited from class java.lang.Object

        clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • inputStream

        protected java.io.InputStream inputStream
        The InputStream specified to the constructor.
      • uri

        protected java.net.URI uri
        The URI of this COLLADA document. May be null.
    • Constructor Detail

      • ColladaInputStream

        public ColladaInputStream​(java.io.InputStream sourceStream,
                                  java.net.URI uri)
                           throws java.io.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:
        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 interface ColladaDoc
        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 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.