Class NumberParser

java.lang.Object
com.mxgraph.util.svg.AbstractParser
com.mxgraph.util.svg.NumberParser
All Implemented Interfaces:
Parser
Direct Known Subclasses:
PathParser, PointsParser

public abstract class NumberParser extends AbstractParser
This class represents a parser with support for numbers.
  • Field Details

    • pow10

      private static final double[] pow10
      Array of powers of ten. Using double instead of float gives a tiny bit more precision.
  • Constructor Details

    • NumberParser

      public NumberParser()
  • Method Details

    • parseFloat

      protected float parseFloat() throws ParseException, IOException
      Parses the content of the buffer and converts it to a float.
      Throws:
      ParseException
      IOException
    • buildFloat

      public static float buildFloat(int mant, int exp)
      Computes a float from mantissa and exponent.