Class InputMeta
java.lang.Object
com.itextpdf.kernel.pdf.canvas.wmf.InputMeta
Helper class to read nt, short, words, etc. from an InputStream.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintGet the amount of bytes read and/or skipped from the InputStream.intreadByte()Read the next byte from the InputStream.Read the nextColorfrom the InputStream.intreadInt()Read the next int from the InputStream.intRead the next short from the InputStream.intreadWord()Read the next word from the InputStream.voidskip(int len) Skips "len" amount of bytes from the InputStream.
-
Constructor Details
-
InputMeta
Creates an InputMeta object.- Parameters:
-
in- InputStream containing the WMF data
-
-
Method Details
-
readWord
Read the next word from the InputStream.- Returns:
- the next word or 0 if the end of the stream has been reached
- Throws:
-
IOException- anIOException
-
readShort
Read the next short from the InputStream.- Returns:
- the next short value
- Throws:
-
IOException- anIOException
-
readInt
Read the next int from the InputStream.- Returns:
- the next int
- Throws:
-
IOException- anIOException
-
readByte
Read the next byte from the InputStream.- Returns:
- the next byte
- Throws:
-
IOException- anIOException
-
skip
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- anIOException
-
getLength
public int getLength()Get the amount of bytes read and/or skipped from the InputStream.- Returns:
- number of bytes read
-
readColor
Read the nextColorfrom the InputStream. This reads 4 bytes.- Returns:
- the next Color
- Throws:
-
IOException- anIOException
-