Class AdobePathReader

java.lang.Object
com.twelvemonkeys.imageio.path.AdobePathReader

public final class AdobePathReader extends Object
Reads a Shape object from an Adobe Photoshop Path resource.
Author:
Jason Palmer, itemMaster LLC, Harald Kuhr
See Also:
  • Constructor Details

    • AdobePathReader

      public AdobePathReader(DataInput data)
      Creates a path reader that will read its data from a DataInput, such as an ImageInputStream. The data length is assumed to be a multiple of 26.
      Parameters:
      data - the input to read data from.
      Throws:
      IllegalArgumentException - if data is null
    • AdobePathReader

      public AdobePathReader(byte[] data)
      Creates a path reader that will read its data from a byte array. The array length must be a multiple of 26, and greater than 0.
      Parameters:
      data - the array to read data from.
      Throws:
      IllegalArgumentException - if data is null, or not a multiple of 26.
  • Method Details

    • readPath

      public Path2D readPath() throws IOException
      Builds the path by reading from the supplied input.
      Returns:
      the path
      Throws:
      IIOException - if the input contains a bad path data.
      IOException - if a general I/O exception occurs during reading.