|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.pdfbox.ttf.TTFDataStream
org.pdfbox.ttf.RAFDataStream
An implementation of the TTFDataStream that goes against a RAF.
Constructor Summary | |
RAFDataStream(File file,
String mode)
Constructor. |
|
RAFDataStream(String name,
String mode)
Constructor. |
Method Summary | |
void |
close()
Close the underlying resources. |
COSStream |
getCOSStream()
Get a COSStream from this TTFDataStream This permit to pass the data read from an external source to the COSObjects to keep a certain persistence layer between specialized objects like the TTF package and the pdmodel package. |
long |
getCurrentPosition()
Get the current position in the 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. |
Methods inherited from class org.pdfbox.ttf.TTFDataStream |
read, read32Fixed, readInternationalDate, readSignedByte, readString, readString, readUnsignedInt, readUnsignedShortArray |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public 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 )
Method Detail |
public short readSignedShort() throws IOException
readSignedShort
in class TTFDataStream
IOException
- If there is an error reading the data.public long getCurrentPosition() throws IOException
getCurrentPosition
in class TTFDataStream
IOException
- If an error occurs while reading the stream.public COSStream getCOSStream()
getCOSStream
in class TTFDataStream
public void close() throws IOException
close
in class TTFDataStream
IOException
- If there is an error closing the resources.public int read() throws IOException
read
in class TTFDataStream
IOException
- If there is an error reading the data.public int readUnsignedShort() throws IOException
readUnsignedShort
in class TTFDataStream
IOException
- If there is an error reading the data.public long readLong() throws IOException
readLong
in class TTFDataStream
IOException
- If there is an error reading the data.public void seek(long pos) throws IOException
seek
in class TTFDataStream
pos
- 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 TTFDataStream
b
- 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 )
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |