public class MemoryTTFDataStream extends TTFDataStream
| 构造器和说明 |
|---|
MemoryTTFDataStream(byte[] data)
构造内存字体随机读取流
|
MemoryTTFDataStream(InputStream is)
Constructor from a stream.
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
close()
Close the underlying resources.
|
long |
getCurrentPosition()
Get the current position in the stream.
|
InputStream |
getOriginalData()
This will get the original data file that was used for this stream.
|
long |
getOriginalDataSize()
This will get the original data size that was used for this stream.
|
int |
read()
Read an unsigned byte.
|
int |
read(byte[] b,
int off,
int len) |
long |
readLong()
Read an unsigned byte.
|
int |
readSignedInt()
Read a signed integer.
|
short |
readSignedShort()
Read an signed short.
|
int |
readUnsignedShort()
Read an unsigned short.
|
void |
seek(long pos)
Seek into the datasource.
|
read, read32Fixed, readInternationalDate, readSignedByte, readString, readString, readString, readTag, readUnsignedByte, readUnsignedByteArray, readUnsignedInt, readUnsignedShortArraypublic MemoryTTFDataStream(byte[] data)
data - 字体数据public MemoryTTFDataStream(InputStream is) throws IOException
is - The stream to read from. It will be closed by this method.IOException - If an error occurs while reading from the stream.public long readLong()
throws IOException
readLong 在类中 TTFDataStreamIOException - If there is an error reading the data.public int readSignedInt()
throws IOException
IOException - If there is a problem reading the file.public int read()
throws IOException
read 在类中 TTFDataStreamIOException - If there is an error reading the data.public int readUnsignedShort()
throws IOException
readUnsignedShort 在类中 TTFDataStreamIOException - If there is an error reading the data.public short readSignedShort()
throws IOException
readSignedShort 在类中 TTFDataStreamIOException - If there is an error reading the data.public void close()
throws IOException
IOException - If there is an error closing the resources.public void seek(long pos)
throws IOException
seek 在类中 TTFDataStreampos - The position to seek to.IOException - If the seek position is negative or larger than MAXINT.public int read(byte[] b,
int off,
int len)
throws IOException
read 在类中 TTFDataStreamb - The buffer to write to.off - The offset into the buffer.len - The length into the buffer.IOException - If there is an error reading from the stream.InputStream.read(byte[], int, int)public long getCurrentPosition()
throws IOException
getCurrentPosition 在类中 TTFDataStreamIOException - If an error occurs while reading the stream.public InputStream getOriginalData() throws IOException
getOriginalData 在类中 TTFDataStreamIOException - If there is an issue reading the data.public long getOriginalDataSize()
getOriginalDataSize 在类中 TTFDataStreamCopyright © 2024. All rights reserved.