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 TypeMethodDescriptionintRead one single Card16 value from the buffer.intRead one single Card8 value from the buffer.intreadOffset(int offSize) Read the offset from the buffer.intRead offSize from the buffer.intreadSID()Read a SID from the buffer.Methods inherited from class 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
-