org.fontbox.ttf
Class RAFDataStream
public class RAFDataStream
An implementation of the TTFDataStream that goes against a RAF.
- Ben Litchfield (ben@benlitchfield.com)
close, getCurrentPosition, getOriginalData, read, read, read, read32Fixed, readInternationalDate, readLong, readSignedByte, readSignedShort, readString, readString, readUnsignedInt, readUnsignedShort, readUnsignedShortArray, seek |
RAFDataStream
public RAFDataStream(File file,
String mode)
throws FileNotFoundException Constructor.
file - The raf file.mode - The mode to open the RAF.
RandomAccessFile.RandomAccessFile( File, String )
RAFDataStream
public RAFDataStream(String name,
String mode)
throws FileNotFoundException Constructor.
name - The raf file.mode - The mode to open the RAF.
RandomAccessFile.RandomAccessFile( String, String )
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
seek
public void seek(long pos)
throws IOException Seek into the datasource.
- seek in interface TTFDataStream
pos - The position to seek to.