Package org.apache.fontbox.cff
Class CFFDataInput
java.lang.Object
org.apache.fontbox.cff.DataInput
org.apache.fontbox.cff.CFFDataInput
This is specialized DataInput. It's used to parse a CFFFont.
- Author:
- Villu Ruusmann
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
Read one single Card16 value from the buffer.int
Read one single Card8 value from the buffer.int
readOffset
(int offSize) Read the offset from the buffer.int
Read offSize from the buffer.int
readSID()
Read a SID from the buffer.Methods inherited from class org.apache.fontbox.cff.DataInput
getPosition, getString, hasRemaining, length, peekUnsignedByte, readByte, readBytes, readInt, readShort, readUnsignedByte, readUnsignedShort, setPosition
-
Constructor Details
-
CFFDataInput
public CFFDataInput(byte[] buffer) Constructor.- Parameters:
buffer
- the buffer to be read
-
-
Method Details
-
readCard8
Read one single Card8 value from the buffer.- Returns:
- the card8 value
- Throws:
IOException
- if an error occurs during reading
-
readCard16
Read one single Card16 value from the buffer.- Returns:
- the card16 value
- Throws:
IOException
- if an error occurs during reading
-
readOffset
Read the offset from the buffer.- Parameters:
offSize
- the given offsize- Returns:
- the offset
- Throws:
IOException
- if an error occurs during reading
-
readOffSize
Read offSize from the buffer. This is a 1 byte value between 1 and 4.- Returns:
- the offSize.
- Throws:
IOException
- if an error occurs during reading or if the value is illegal.
-
readSID
Read a SID from the buffer.- Returns:
- the SID
- Throws:
IOException
- if an error occurs during reading
-