org.fontbox.ttf
Class MemoryTTFDataStream
public class MemoryTTFDataStream
An interface into a data stream.
- Ben Litchfield (ben@benlitchfield.com)
close, getCurrentPosition, getOriginalData, read, read, read, read32Fixed, readInternationalDate, readLong, readSignedByte, readSignedShort, readString, readString, readUnsignedInt, readUnsignedShort, readUnsignedShortArray, seek |
MemoryTTFDataStream
public MemoryTTFDataStream(InputStream is)
throws IOException Constructor from a stream.
is - The stream of read from.
close
public void close()
throws IOException Close the underlying resources.
- close in interface TTFDataStream
getCurrentPosition
public long getCurrentPosition()
throws IOException Get the current position in the stream.
- getCurrentPosition in interface TTFDataStream
- The current position in the stream.
read
public int read()
throws IOException Read an unsigned byte.
- read in interface TTFDataStream
read
public int read(byte[] b,
int off,
int len)
throws IOException- read in interface TTFDataStream
b - The buffer to write to.off - The offset into the buffer.len - The length into the buffer.
- The number of bytes read.
java.io.InputStream.read( byte[], int, int )
readLong
public long readLong()
throws IOException Read an unsigned byte.
- readLong in interface TTFDataStream
readSignedInt
public int readSignedInt()
throws IOException Read a signed integer.
seek
public void seek(long pos)
throws IOException Seek into the datasource.
- seek in interface TTFDataStream
pos - The position to seek to.