Package com.twelvemonkeys.imageio.path
Class AdobePathReader
- java.lang.Object
-
- com.twelvemonkeys.imageio.path.AdobePathReader
-
public final class AdobePathReader extends java.lang.ObjectReads aShapeobject from an Adobe Photoshop Path resource.- Author:
- Jason Palmer, itemMaster LLC, Harald Kuhr
- See Also:
- Adobe Photoshop Path resource format
-
-
Constructor Summary
Constructors Constructor Description AdobePathReader(byte[] data)Creates a path reader that will read its data from abytearray.AdobePathReader(java.io.DataInput data)Creates a path reader that will read its data from aDataInput, such as anImageInputStream.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.awt.geom.Path2DreadPath()Builds the path by reading from the supplied input.
-
-
-
Constructor Detail
-
AdobePathReader
public AdobePathReader(java.io.DataInput data)
Creates a path reader that will read its data from aDataInput, such as anImageInputStream. The data length is assumed to be a multiple of 26.- Parameters:
data- the input to read data from.- Throws:
java.lang.IllegalArgumentException- ifdataisnull
-
AdobePathReader
public AdobePathReader(byte[] data)
Creates a path reader that will read its data from abytearray. The array length must be a multiple of 26, and greater than 0.- Parameters:
data- the array to read data from.- Throws:
java.lang.IllegalArgumentException- ifdataisnull, or not a multiple of 26.
-
-
Method Detail
-
readPath
public java.awt.geom.Path2D readPath() throws java.io.IOExceptionBuilds the path by reading from the supplied input.- Returns:
- the path
- Throws:
javax.imageio.IIOException- if the input contains a bad path data.java.io.IOException- if a general I/O exception occurs during reading.
-
-