Class BinaryGraphReader

    • Constructor Detail

      • BinaryGraphReader

        public BinaryGraphReader​(java.io.DataInputStream dis)
        Create a new BinaryGraphReader that read from the given input stream.
        Parameters:
        dis - Input stream to read from.
    • Method Detail

      • toAccessInformation

        protected static AccessRestrictions toAccessInformation​(long access)
        Parse the given long value into a new instance of AccessRestrictions.
        Parameters:
        access - The value to parse.
        Returns:
        New instance of access restrictions parsed from the given value.
      • toRoadType

        protected static RoadInformation.RoadType toRoadType​(char ch)
        Convert a character to its corresponding road type.
        Parameters:
        ch - Character to convert.
        Returns:
        Road type corresponding to the given character.
      • read

        public Graph read()
                   throws java.io.IOException
        Description copied from interface: GraphReader
        Read a graph an returns it.
        Specified by:
        read in interface GraphReader
        Returns:
        The graph read.
        Throws:
        java.io.IOException - if an exception occurs while reading the graph.