Package com.tom_roush.fontbox.cff
Class CFFDataInput
- java.lang.Object
-
- com.tom_roush.fontbox.cff.DataInput
-
- com.tom_roush.fontbox.cff.CFFDataInput
-
public class CFFDataInput extends DataInput
This is specialized DataInput. It's used to parse a CFFFont.
-
-
Constructor Summary
Constructors Constructor Description CFFDataInput(byte[] buffer)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intreadCard16()Read one single Card16 value from the buffer.intreadCard8()Read one single Card8 value from the buffer.intreadOffset(int offSize)Read the offset from the buffer.intreadOffSize()Read offSize from the buffer.intreadSID()Read a SID from the buffer.-
Methods inherited from class com.tom_roush.fontbox.cff.DataInput
getPosition, getString, hasRemaining, length, peekUnsignedByte, readByte, readBytes, readInt, readShort, readUnsignedByte, readUnsignedShort, setPosition
-
-
-
-
Method Detail
-
readCard8
public int readCard8() throws IOExceptionRead one single Card8 value from the buffer.- Returns:
- the card8 value
- Throws:
IOException- if an error occurs during reading
-
readCard16
public int readCard16() throws IOExceptionRead one single Card16 value from the buffer.- Returns:
- the card16 value
- Throws:
IOException- if an error occurs during reading
-
readOffset
public int readOffset(int offSize) throws IOExceptionRead the offset from the buffer.- Parameters:
offSize- the given offsize- Returns:
- the offset
- Throws:
IOException- if an error occurs during reading
-
readOffSize
public int readOffSize() throws IOExceptionRead 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
public int readSID() throws IOExceptionRead a SID from the buffer.- Returns:
- the SID
- Throws:
IOException- if an error occurs during reading
-
-