| java.lang.Object com.lowagie.text.pdf.RandomAccessFileOrArray
RandomAccessFileOrArray | public class RandomAccessFileOrArray implements DataInput(Code) | | An implementation of a RandomAccessFile for input only
that accepts a file or a byte array as data source.
author: Paulo Soares (psoares@consiste.pt) |
arrayInPtr | int arrayInPtr(Code) | | |
plainRandomAccess | boolean plainRandomAccess(Code) | | |
RandomAccessFileOrArray | public RandomAccessFileOrArray(String filename, boolean forceRead, boolean plainRandomAccess) throws IOException(Code) | | |
RandomAccessFileOrArray | public RandomAccessFileOrArray(byte arrayIn)(Code) | | |
getStartOffset | public int getStartOffset()(Code) | | Getter for property startOffset.
Value of property startOffset. |
isOpen | public boolean isOpen()(Code) | | |
pushBack | public void pushBack(byte b)(Code) | | |
readCharLE | final public char readCharLE() throws IOException(Code) | | Reads a Unicode character from this stream in little-endian order.
This method reads two
bytes from the stream, starting at the current stream pointer.
If the bytes read, in order, are
b1 and b2 , where
0 <= b1, b2 <= 255 ,
then the result is equal to:
(char)((b2 << 8) | b1)
This method blocks until the two bytes are read, the end of the
stream is detected, or an exception is thrown.
the next two bytes of this stream as a Unicode character. exception: EOFException - if this stream reaches the end before readingtwo bytes. exception: IOException - if an I/O error occurs. |
readIntLE | final public int readIntLE() throws IOException(Code) | | Reads a signed 32-bit integer from this stream in little-endian order.
This method reads 4
bytes from the stream, starting at the current stream pointer.
If the bytes read, in order, are b1 ,
b2 , b3 , and b4 , where
0 <= b1, b2, b3, b4 <= 255 ,
then the result is equal to:
(b4 << 24) | (b3 << 16) + (b2 << 8) + b1
This method blocks until the four bytes are read, the end of the
stream is detected, or an exception is thrown.
the next four bytes of this stream, interpreted as anint . exception: EOFException - if this stream reaches the end before readingfour bytes. exception: IOException - if an I/O error occurs. |
readShortLE | final public short readShortLE() throws IOException(Code) | | Reads a signed 16-bit number from this stream in little-endian order.
The method reads two
bytes from this stream, starting at the current stream pointer.
If the two bytes read, in order, are
b1 and b2 , where each of the two values is
between 0 and 255 , inclusive, then the
result is equal to:
(short)((b2 << 8) | b1)
This method blocks until the two bytes are read, the end of the
stream is detected, or an exception is thrown.
the next two bytes of this stream, interpreted as a signed16-bit number. exception: EOFException - if this stream reaches the end before readingtwo bytes. exception: IOException - if an I/O error occurs. |
readUnsignedInt | final public long readUnsignedInt() throws IOException(Code) | | Reads an unsigned 32-bit integer from this stream. This method reads 4
bytes from the stream, starting at the current stream pointer.
If the bytes read, in order, are b1 ,
b2 , b3 , and b4 , where
0 <= b1, b2, b3, b4 <= 255 ,
then the result is equal to:
(b1 << 24) | (b2 << 16) + (b3 << 8) + b4
This method blocks until the four bytes are read, the end of the
stream is detected, or an exception is thrown.
the next four bytes of this stream, interpreted as along . exception: EOFException - if this stream reaches the end before readingfour bytes. exception: IOException - if an I/O error occurs. |
readUnsignedShortLE | final public int readUnsignedShortLE() throws IOException(Code) | | Reads an unsigned 16-bit number from this stream in little-endian order.
This method reads
two bytes from the stream, starting at the current stream pointer.
If the bytes read, in order, are
b1 and b2 , where
0 <= b1, b2 <= 255 ,
then the result is equal to:
(b2 << 8) | b1
This method blocks until the two bytes are read, the end of the
stream is detected, or an exception is thrown.
the next two bytes of this stream, interpreted as anunsigned 16-bit integer. exception: EOFException - if this stream reaches the end before readingtwo bytes. exception: IOException - if an I/O error occurs. |
setStartOffset | public void setStartOffset(int startOffset)(Code) | | Setter for property startOffset.
Parameters: startOffset - New value of property startOffset. |
|
|