类 FontInputStream
java.lang.Object
java.io.InputStream
java.io.FilterInputStream
com.google.typography.font.sfntly.data.FontInputStream
- 所有已实现的接口:
Closeable,AutoCloseable
An input stream for reading font data.
The data types used are as listed:
| BYTE | 8-bit unsigned integer. |
| CHAR | 8-bit signed integer. |
| USHORT | 16-bit unsigned integer. |
| SHORT | 16-bit signed integer. |
| UINT24 | 24-bit unsigned integer. |
| ULONG | 32-bit unsigned integer. |
| LONG | 32-bit signed integer. |
| Fixed | 32-bit signed fixed-point number (16.16) |
| FUNIT | Smallest measurable distance in the em space. |
| FWORD | 16-bit signed integer (SHORT) that describes a quantity in FUnits. |
| UFWORD | 16-bit unsigned integer (USHORT) that describes a quantity in FUnits. |
| F2DOT14 | 16-bit signed fixed number with the low 14 bits of fraction (2.14). |
| LONGDATETIME | Date represented in number of seconds since 12:00 midnight, January 1, 1904. The value is represented as a signed 64-bit integer. |
- 作者:
- Stuart Gill
- 另请参阅:
-
字段概要
字段从类继承的字段 java.io.FilterInputStream
in -
构造器概要
构造器构造器说明Constructor.FontInputStream(InputStream is, int length) Constructor for a bounded font input stream. -
方法概要
修饰符和类型方法说明longposition()Get the current position in the stream in bytes.intread()intread(byte[] b) intread(byte[] b, int off, int len) intreadChar()Read a Char value.longRead a DateTime value as a long.intRead a Fixed value.intreadLong()Read a Long value.intRead a Short value.intRead a UInt24 value.longRead a ULong value.intRead a ULong value as an int.intRead a UShort value.longskip(long n) 从类继承的方法 java.io.FilterInputStream
available, close, mark, markSupported, reset从类继承的方法 java.io.InputStream
nullInputStream, readAllBytes, readNBytes, readNBytes, skipNBytes, transferTo
-
字段详细资料
-
position
private long position -
length
private long length -
bounded
private boolean bounded
-
-
构造器详细资料
-
FontInputStream
Constructor.- 参数:
is- input stream to wrap
-
FontInputStream
Constructor for a bounded font input stream.- 参数:
is- input stream to wraplength- the maximum length of bytes to read
-
-
方法详细资料
-
read
- 覆盖:
read在类中FilterInputStream- 抛出:
IOException
-
read
- 覆盖:
read在类中FilterInputStream- 抛出:
IOException
-
read
- 覆盖:
read在类中FilterInputStream- 抛出:
IOException
-
position
public long position()Get the current position in the stream in bytes.- 返回:
- the current position in bytes
-
readChar
Read a Char value.- 返回:
- Char value
- 抛出:
IOException
-
readUShort
Read a UShort value.- 返回:
- UShort value
- 抛出:
IOException
-
readShort
Read a Short value.- 返回:
- Short value
- 抛出:
IOException
-
readUInt24
Read a UInt24 value.- 返回:
- UInt24 value
- 抛出:
IOException
-
readULong
Read a ULong value.- 返回:
- ULong value
- 抛出:
IOException
-
readULongAsInt
Read a ULong value as an int. If the value is not representable as an integer anArithmeticExceptionis thrown.- 返回:
- Ulong value
- 抛出:
IOExceptionArithmeticException
-
readLong
Read a Long value.- 返回:
- Long value
- 抛出:
IOException
-
readFixed
Read a Fixed value.- 返回:
- Fixed value
- 抛出:
IOException
-
readDateTimeAsLong
Read a DateTime value as a long.- 返回:
- DateTime value.
- 抛出:
IOException
-
skip
- 覆盖:
skip在类中FilterInputStream- 抛出:
IOException
-