Class InputMeta

java.lang.Object
com.itextpdf.kernel.pdf.canvas.wmf.InputMeta

public class InputMeta extends Object
Helper class to read nt, short, words, etc. from an InputStream.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    (package private) InputStream
     
    (package private) int
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates an InputMeta object.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Get the amount of bytes read and/or skipped from the InputStream.
    int
    Read the next byte from the InputStream.
    Read the next Color from the InputStream.
    int
    Read the next int from the InputStream.
    int
    Read the next short from the InputStream.
    int
    Read the next word from the InputStream.
    void
    skip(int len)
    Skips "len" amount of bytes from the InputStream.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • InputMeta

      public InputMeta(InputStream in)
      Creates an InputMeta object.
      Parameters:
      in - InputStream containing the WMF data
  • Method Details

    • readWord

      public int readWord() throws IOException
      Read the next word from the InputStream.
      Returns:
      the next word or 0 if the end of the stream has been reached
      Throws:
      IOException - an IOException
    • readShort

      public int readShort() throws IOException
      Read the next short from the InputStream.
      Returns:
      the next short value
      Throws:
      IOException - an IOException
    • readInt

      public int readInt() throws IOException
      Read the next int from the InputStream.
      Returns:
      the next int
      Throws:
      IOException - an IOException
    • readByte

      public int readByte() throws IOException
      Read the next byte from the InputStream.
      Returns:
      the next byte
      Throws:
      IOException - an IOException
    • skip

      public void skip(int len) throws IOException
      Skips "len" amount of bytes from the InputStream. If len is < 0, nothing is skipped.
      Parameters:
      len - amount of bytes needed to skip
      Throws:
      IOException - an IOException
    • getLength

      public int getLength()
      Get the amount of bytes read and/or skipped from the InputStream.
      Returns:
      number of bytes read
    • readColor

      public Color readColor() throws IOException
      Read the next Color from the InputStream. This reads 4 bytes.
      Returns:
      the next Color
      Throws:
      IOException - an IOException