Class PICTUtil

java.lang.Object
com.twelvemonkeys.imageio.plugins.pict.PICTUtil

final class PICTUtil extends Object
PICTUtil
Version:
$Id: PICTUtil.java,v 1.0 Feb 16, 2009 8:46:27 PM haraldk Exp$
  • Field Details

  • Constructor Details

    • PICTUtil

      PICTUtil()
  • Method Details

    • initEncoding

      private static Charset initEncoding()
    • readFixedPoint

      public static double readFixedPoint(DataInput pStream) throws IOException
      Reads a fixed point number from the given stream.
      Parameters:
      pStream - the input stream
      Returns:
      the number as a double.
      Throws:
      IOException - if an I/O error occurs during read
    • readIdString

      static String readIdString(DataInput pStream) throws IOException
      Throws:
      IOException
    • readDimension

      public static Dimension readDimension(DataInput pStream) throws IOException
      Reads a dimension from the given stream.
      Parameters:
      pStream - the input stream
      Returns:
      the dimension read
      Throws:
      IOException - if an I/O error occurs during read
    • readStr31

      public static String readStr31(DataInput pStream) throws IOException
      Reads 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:
      IOException - if an I/O exception occurs during reading
    • readPascalString

      public static String readPascalString(DataInput pStream) throws IOException
      Reads 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:
      IOException - if an I/O exception occurs during reading
    • readPattern

      public static Pattern readPattern(DataInput pStream) throws IOException
      Reads a pattern from the given stream.
      Parameters:
      pStream - the input stream
      Returns:
      the pattern read
      Throws:
      IOException - if an I/O error occurs during read
    • readPattern

      public static Pattern readPattern(DataInput pStream, Color fg, Color bg) throws IOException
      Throws:
      IOException
    • readColorPattern

      public static Pattern readColorPattern(DataInput pStream) throws IOException
      Reads a variable width color pattern from the given stream
      Parameters:
      pStream - the input stream
      Returns:
      the pattern read
      Throws:
      IOException - if an I/O error occurs during read
    • readRGBColor

      public static Color readRGBColor(DataInput pStream) throws IOException
      Reads an RGBColor record from the given stream.
      Parameters:
      pStream - the input stream
      Returns:
      the color read
      Throws:
      IOException - if an I/O error occurs during read
    • readColorTable

      public static IndexColorModel readColorTable(DataInput pStream, int pPixelSize) throws IOException
      Reads a ColorTable data structure from the given stream.
      Parameters:
      pStream - the input stream
      pPixelSize - the pixel size
      Returns:
      the indexed color model created from the ColorSpec records read.
      Throws:
      IOException - if an I/O error occurs during read