Class FigureSvgTinyReader

java.lang.Object
org.jhotdraw8.svg.io.FigureSvgTinyReader

public class FigureSvgTinyReader extends Object
Reads an SVG "Tiny" 1.2 file and creates Figure objects from it.

References:

SVG 1.2 Tiny
w3.org
SVG Strokes
w3.org
  • Field Details

  • Constructor Details

    • FigureSvgTinyReader

      public FigureSvgTinyReader()
  • Method Details

    • isBestEffort

      public boolean isBestEffort()
      Returns true if the reader runs in best effort mode.

      If best effort mode is true, the reader attempts to perform error processing as specified in SVG 1.2 Error processing .

      If best effort mode is false, the reader throws an exception at every element or value that it does not understand.

      The default value is false.

      Returns:
      whether the reader runs in best effort mode.
    • setBestEffort

      public void setBestEffort(boolean bestEffort)
    • read

      public Figure read(@NonNull Path file) throws IOException
      Throws:
      IOException
    • read

      public Figure read(@NonNull URL file) throws IOException
      Throws:
      IOException
    • read

      public Figure read(@NonNull Source in) throws IOException
      Warning: this method does not close the input source.
      Throws:
      IOException
    • clearErrors

      public void clearErrors()
      Clears the errors list.
    • getCopyOfErrors

      public List<String> getCopyOfErrors()
      Gets a copy of the errors list.
      Returns:
      a copy of the errors list