public class RAFDataStream extends TTFDataStream
| Constructor and Description |
|---|
RAFDataStream(File file,
String mode)
Constructor.
|
RAFDataStream(String name,
String mode)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
int |
read()
Read an unsigned byte.
|
int |
read(byte[] b,
int off,
int len) |
long |
readLong()
Read an unsigned byte.
|
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, readUnsignedByte, readUnsignedByteArray, readUnsignedInt, readUnsignedShortArraypublic RAFDataStream(String name, String mode) throws FileNotFoundException
name - The raf file.mode - The mode to open the RAF.FileNotFoundException - If there is a problem creating the RAF.RandomAccessFile.RandomAccessFile( String, String )public RAFDataStream(File file, String mode) throws FileNotFoundException
file - The raf file.mode - The mode to open the RAF.FileNotFoundException - If there is a problem creating the RAF.RandomAccessFile.RandomAccessFile( File, String )public short readSignedShort()
throws IOException
readSignedShort in class TTFDataStreamIOException - If there is an error reading the data.public long getCurrentPosition()
throws IOException
getCurrentPosition in class TTFDataStreamIOException - If an error occurs while reading the stream.public void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class TTFDataStreamIOException - If there is an error closing the resources.public int read()
throws IOException
read in class TTFDataStreamIOException - If there is an error reading the data.public int readUnsignedShort()
throws IOException
readUnsignedShort in class TTFDataStreamIOException - If there is an error reading the data.public long readLong()
throws IOException
readLong in class TTFDataStreamIOException - If there is an error reading the data.public void seek(long pos)
throws IOException
seek in class TTFDataStreampos - The position to seek to.IOException - If there is an error seeking to that position.public int read(byte[] b,
int off,
int len)
throws IOException
read in class 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 InputStream getOriginalData() throws IOException
getOriginalData in class TTFDataStreamIOException - If there is an issue reading the data.Copyright © 2008-2015 The Apache Software Foundation. All Rights Reserved.