Class PICTUtil
- java.lang.Object
-
- com.twelvemonkeys.imageio.plugins.pict.PICTUtil
-
final class PICTUtil extends java.lang.ObjectPICTUtil- Version:
- $Id: PICTUtil.java,v 1.0 Feb 16, 2009 8:46:27 PM haraldk Exp$
-
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.StringENC_MAC_ROMANstatic java.nio.charset.CharsetENCODING
-
Constructor Summary
Constructors Constructor Description PICTUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description private static java.nio.charset.CharsetinitEncoding()static PatternreadColorPattern(java.io.DataInput pStream)Reads a variable widthcolor patternfrom the given streamstatic java.awt.image.IndexColorModelreadColorTable(java.io.DataInput pStream, int pPixelSize)Reads aColorTabledata structure from the given stream.static java.awt.DimensionreadDimension(java.io.DataInput pStream)Reads a dimension from the given stream.static doublereadFixedPoint(java.io.DataInput pStream)Reads a fixed point number from the given stream.(package private) static java.lang.StringreadIdString(java.io.DataInput pStream)static java.lang.StringreadPascalString(java.io.DataInput pStream)Reads a Pascal String from the given stream.static PatternreadPattern(java.io.DataInput pStream)Reads apatternfrom the given stream.static PatternreadPattern(java.io.DataInput pStream, java.awt.Color fg, java.awt.Color bg)static java.awt.ColorreadRGBColor(java.io.DataInput pStream)Reads anRGBColorrecord from the given stream.static java.lang.StringreadStr31(java.io.DataInput pStream)Reads a 32 byte fixed length Pascal string from the given input.
-
-
-
Field Detail
-
ENC_MAC_ROMAN
private static final java.lang.String ENC_MAC_ROMAN
- See Also:
- Constant Field Values
-
ENCODING
public static final java.nio.charset.Charset ENCODING
-
-
Method Detail
-
initEncoding
private static java.nio.charset.Charset initEncoding()
-
readFixedPoint
public static double readFixedPoint(java.io.DataInput pStream) throws java.io.IOExceptionReads a fixed point number from the given stream.- Parameters:
pStream- the input stream- Returns:
- the number as a
double. - Throws:
java.io.IOException- if an I/O error occurs during read
-
readIdString
static java.lang.String readIdString(java.io.DataInput pStream) throws java.io.IOException- Throws:
java.io.IOException
-
readDimension
public static java.awt.Dimension readDimension(java.io.DataInput pStream) throws java.io.IOExceptionReads a dimension from the given stream.- Parameters:
pStream- the input stream- Returns:
- the dimension read
- Throws:
java.io.IOException- if an I/O error occurs during read
-
readStr31
public static java.lang.String readStr31(java.io.DataInput pStream) throws java.io.IOExceptionReads a 32 byte fixed length Pascal string from the given input. The input stream must be positioned at the length byte of the text, the text will be no longer than 31 characters long.- Parameters:
pStream- the input stream- Returns:
- the text read
- Throws:
java.io.IOException- if an I/O exception occurs during reading
-
readPascalString
public static java.lang.String readPascalString(java.io.DataInput pStream) throws java.io.IOExceptionReads a Pascal String from the given stream. The input stream must be positioned at the length byte of the text, which can thus be a maximum of 255 characters long.- Parameters:
pStream- the input stream- Returns:
- the text read
- Throws:
java.io.IOException- if an I/O exception occurs during reading
-
readPattern
public static Pattern readPattern(java.io.DataInput pStream) throws java.io.IOException
Reads apatternfrom the given stream.- Parameters:
pStream- the input stream- Returns:
- the pattern read
- Throws:
java.io.IOException- if an I/O error occurs during read
-
readPattern
public static Pattern readPattern(java.io.DataInput pStream, java.awt.Color fg, java.awt.Color bg) throws java.io.IOException
- Throws:
java.io.IOException
-
readColorPattern
public static Pattern readColorPattern(java.io.DataInput pStream) throws java.io.IOException
Reads a variable widthcolor patternfrom the given stream- Parameters:
pStream- the input stream- Returns:
- the pattern read
- Throws:
java.io.IOException- if an I/O error occurs during read
-
readRGBColor
public static java.awt.Color readRGBColor(java.io.DataInput pStream) throws java.io.IOExceptionReads anRGBColorrecord from the given stream.- Parameters:
pStream- the input stream- Returns:
- the color read
- Throws:
java.io.IOException- if an I/O error occurs during read
-
readColorTable
public static java.awt.image.IndexColorModel readColorTable(java.io.DataInput pStream, int pPixelSize) throws java.io.IOExceptionReads aColorTabledata structure from the given stream.- Parameters:
pStream- the input streampPixelSize- the pixel size- Returns:
- the indexed color model created from the
ColorSpecrecords read. - Throws:
java.io.IOException- if an I/O error occurs during read
-
-