Class NodeStreamReader

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable, NodeDataReader

    public class NodeStreamReader
    extends java.lang.Object
    implements NodeDataReader
    A node stream reader.
    • Method Detail

      • open

        public static NodeStreamReader open​(java.lang.String fileName)
                                     throws java.io.IOException
        Throws:
        java.io.IOException
      • readVarInt

        public static int readVarInt​(java.io.InputStream in)
                              throws java.io.IOException
        Read a variable size int.
        Returns:
        the value
        Throws:
        java.io.IOException
      • readNode

        public NodeData readNode()
                          throws java.io.IOException
        Description copied from interface: NodeDataReader
        Read the next node.
        Specified by:
        readNode in interface NodeDataReader
        Returns:
        the node, or null for EOF
        Throws:
        java.io.IOException
      • close

        public void close()
                   throws java.io.IOException
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Throws:
        java.io.IOException