Class InputMeta
- java.lang.Object
-
- com.itextpdf.kernel.pdf.canvas.wmf.InputMeta
-
public class InputMeta extends java.lang.Object
Helper class to read nt, short, words, etc. from an InputStream.
-
-
Constructor Summary
Constructors Constructor Description InputMeta(java.io.InputStream in)
Creates an InputMeta object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getLength()
Get the amount of bytes read and/or skipped from the InputStream.int
readByte()
Read the next byte from the InputStream.Color
readColor()
Read the nextColor
from the InputStream.int
readInt()
Read the next int from the InputStream.int
readShort()
Read the next short from the InputStream.int
readWord()
Read the next word from the InputStream.void
skip(int len)
Skips "len" amount of bytes from the InputStream.
-
-
-
Method Detail
-
readWord
public int readWord() throws java.io.IOException
Read the next word from the InputStream.- Returns:
- the next word or 0 if the end of the stream has been reached
- Throws:
java.io.IOException
- anIOException
-
readShort
public int readShort() throws java.io.IOException
Read the next short from the InputStream.- Returns:
- the next short value
- Throws:
java.io.IOException
- anIOException
-
readInt
public int readInt() throws java.io.IOException
Read the next int from the InputStream.- Returns:
- the next int
- Throws:
java.io.IOException
- anIOException
-
readByte
public int readByte() throws java.io.IOException
Read the next byte from the InputStream.- Returns:
- the next byte
- Throws:
java.io.IOException
- anIOException
-
skip
public void skip(int len) throws java.io.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:
java.io.IOException
- anIOException
-
getLength
public int getLength()
Get the amount of bytes read and/or skipped from the InputStream.- Returns:
- number of bytes read
-
-