Class ColladaFile

  • All Implemented Interfaces:
    ColladaDoc

    public class ColladaFile
    extends java.lang.Object
    implements ColladaDoc
    Represents a COLLADA document read from a file.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.io.File colladaFile
      File from which COLLADA content is read.
    • Constructor Summary

      Constructors 
      Constructor Description
      ColladaFile​(java.io.File file)
      Create a new instance from a file.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.io.InputStream getInputStream()
      Returns an InputStream to the associated COLLADA document.
      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

      • colladaFile

        protected java.io.File colladaFile
        File from which COLLADA content is read.
    • Constructor Detail

      • ColladaFile

        public ColladaFile​(java.io.File file)
        Create a new instance from a file.
        Parameters:
        file - COLLADA file from which to read content.
    • Method Detail

      • getInputStream

        public java.io.InputStream getInputStream()
                                           throws java.io.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:
        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.