Package de.javagl.ply

Interface PlyReader


  • public interface PlyReader
    Interface for classes that can read PLY data
    • Method Detail

      • read

        PlySource read​(InputStream inputStream)
                throws IOException
        Read the data from the given input stream and return it as a PlySource The caller is responsible for closing the given stream.
        Parameters:
        inputStream - The input stream
        Returns:
        The resulting data as a PlySource
        Throws:
        IOException - If an IO error occurs
      • readDescriptor

        Descriptor readDescriptor​(InputStream inputStream)
                           throws IOException
        Read the Descriptor from the given input stream. This will read the stream, byte by byte, until the header is complete and the Descriptor can be returned. The caller will usually not close the input stream after this method returns. Instead, the caller will pass the remaining stream to readContent(InputStream, PlyTarget) and close the input stream afterwards.
        Parameters:
        inputStream - The input stream
        Returns:
        The Descriptor
        Throws:
        IOException - If an IO error occurs
      • readContent

        void readContent​(InputStream inputStream,
                         PlyTarget plyTarget)
                  throws IOException
        Read the main content from the given input stream and pass it to the given PlyTarget. This assumes that the Descriptor was already read from the given input stream, and the stream only contains the remaining data. The caller is responsible for closing the given stream.
        Parameters:
        inputStream - The input stream
        plyTarget - The PlyTarget
        Throws:
        IOException - If an IO error occurs