Class RandomAccessFileOrArray
java.lang.Object
com.lowagie.text.pdf.RandomAccessFileOrArray
- All Implemented Interfaces:
Closeable, DataInput, AutoCloseable
Deprecated.
An implementation of a RandomAccessFile for input only that accepts a file or a byte array as data source.
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) byte[]Deprecated.(package private) intDeprecated.(package private) byteDeprecated.(package private) StringDeprecated.(package private) booleanDeprecated.(package private) booleanDeprecated.(package private) MappedRandomAccessFileDeprecated.private intDeprecated.Holds value of property startOffset.(package private) RandomAccessFileDeprecated. -
Constructor Summary
ConstructorsConstructorDescriptionRandomAccessFileOrArray(byte[] arrayIn) Deprecated.Deprecated.Deprecated.RandomAccessFileOrArray(String filename) Deprecated.RandomAccessFileOrArray(String filename, boolean forceRead, boolean plainRandomAccess) Deprecated.Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Deprecated.intDeprecated.Deprecated.intDeprecated.Getter for property startOffset.static byte[]Deprecated.protected voidDeprecated.booleanisOpen()Deprecated.intlength()Deprecated.voidpushBack(byte b) Deprecated.intread()Deprecated.intread(byte[] b) Deprecated.intread(byte[] b, int off, int len) Deprecated.booleanDeprecated.bytereadByte()Deprecated.charreadChar()Deprecated.final charDeprecated.Reads a Unicode character from this stream in little-endian order.doubleDeprecated.final doubleDeprecated.floatDeprecated.final floatDeprecated.voidreadFully(byte[] b) Deprecated.voidreadFully(byte[] b, int off, int len) Deprecated.intreadInt()Deprecated.final intDeprecated.Reads a signed 32-bit integer from this stream in little-endian order.readLine()Deprecated.longreadLong()Deprecated.final longDeprecated.shortDeprecated.final shortDeprecated.Reads a signed 16-bit number from this stream in little-endian order.intDeprecated.final longDeprecated.Reads an unsigned 32-bit integer from this stream.final longDeprecated.intDeprecated.final intDeprecated.Reads an unsigned 16-bit number from this stream in little-endian order.readUTF()Deprecated.voidreOpen()Deprecated.voidseek(int pos) Deprecated.voidseek(long pos) Deprecated.voidsetStartOffset(int startOffset) Deprecated.Setter for property startOffset.longskip(long n) Deprecated.intskipBytes(int n) Deprecated.
-
Field Details
-
rf
Deprecated. -
trf
RandomAccessFile trfDeprecated. -
plainRandomAccess
boolean plainRandomAccessDeprecated. -
filename
String filenameDeprecated. -
arrayIn
byte[] arrayInDeprecated. -
arrayInPtr
int arrayInPtrDeprecated. -
back
byte backDeprecated. -
isBack
boolean isBackDeprecated. -
startOffset
private int startOffsetDeprecated.Holds value of property startOffset.
-
-
Constructor Details
-
RandomAccessFileOrArray
-
RandomAccessFileOrArray
public RandomAccessFileOrArray(String filename, boolean forceRead, boolean plainRandomAccess) throws IOException Deprecated.- Throws:
IOException
-
RandomAccessFileOrArray
-
RandomAccessFileOrArray
-
RandomAccessFileOrArray
public RandomAccessFileOrArray(byte[] arrayIn) Deprecated. -
RandomAccessFileOrArray
Deprecated.
-
-
Method Details
-
InputStreamToArray
Deprecated.- Throws:
IOException
-
pushBack
public void pushBack(byte b) Deprecated. -
read
-
read
-
read
-
readFully
Deprecated.- Specified by:
readFullyin interfaceDataInput- Throws:
IOException
-
readFully
Deprecated.- Specified by:
readFullyin interfaceDataInput- Throws:
IOException
-
skip
-
skipBytes
Deprecated.- Specified by:
skipBytesin interfaceDataInput- Throws:
IOException
-
reOpen
-
insureOpen
-
isOpen
public boolean isOpen()Deprecated. -
close
Deprecated.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
length
-
seek
-
seek
-
getFilePointer
-
readBoolean
Deprecated.- Specified by:
readBooleanin interfaceDataInput- Throws:
IOException
-
readByte
Deprecated.- Specified by:
readBytein interfaceDataInput- Throws:
IOException
-
readUnsignedByte
Deprecated.- Specified by:
readUnsignedBytein interfaceDataInput- Throws:
IOException
-
readShort
Deprecated.- Specified by:
readShortin interfaceDataInput- Throws:
IOException
-
readShortLE
Deprecated.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, areb1andb2, where each of the two values is between0and255, 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.
- Returns:
- the next two bytes of this stream, interpreted as a signed 16-bit number.
- Throws:
EOFException- if this stream reaches the end before reading two bytes.IOException- if an I/O error occurs.
-
readUnsignedShort
Deprecated.- Specified by:
readUnsignedShortin interfaceDataInput- Throws:
IOException
-
readUnsignedShortLE
Deprecated.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, areb1andb2, where0 <= b1, b2 <= 255, then the result is equal to:(b2 << 8) | b1This method blocks until the two bytes are read, the end of the stream is detected, or an exception is thrown.
- Returns:
- the next two bytes of this stream, interpreted as an unsigned 16-bit integer.
- Throws:
EOFException- if this stream reaches the end before reading two bytes.IOException- if an I/O error occurs.
-
readChar
Deprecated.- Specified by:
readCharin interfaceDataInput- Throws:
IOException
-
readCharLE
Deprecated.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, areb1andb2, where0 <= 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.
- Returns:
- the next two bytes of this stream as a Unicode character.
- Throws:
EOFException- if this stream reaches the end before reading two bytes.IOException- if an I/O error occurs.
-
readInt
Deprecated.- Specified by:
readIntin interfaceDataInput- Throws:
IOException
-
readIntLE
Deprecated.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, areb1,b2,b3, andb4, where0 <= b1, b2, b3, b4 <= 255, then the result is equal to:(b4 << 24) | (b3 << 16) + (b2 << 8) + b1This method blocks until the four bytes are read, the end of the stream is detected, or an exception is thrown.
- Returns:
- the next four bytes of this stream, interpreted as an
int. - Throws:
EOFException- if this stream reaches the end before reading four bytes.IOException- if an I/O error occurs.
-
readUnsignedInt
Deprecated.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, areb1,b2,b3, andb4, where0 <= b1, b2, b3, b4 <= 255, then the result is equal to:(b1 << 24) | (b2 << 16) + (b3 << 8) + b4This method blocks until the four bytes are read, the end of the stream is detected, or an exception is thrown.
- Returns:
- the next four bytes of this stream, interpreted as a
long. - Throws:
EOFException- if this stream reaches the end before reading four bytes.IOException- if an I/O error occurs.
-
readUnsignedIntLE
-
readLong
Deprecated.- Specified by:
readLongin interfaceDataInput- Throws:
IOException
-
readLongLE
-
readFloat
Deprecated.- Specified by:
readFloatin interfaceDataInput- Throws:
IOException
-
readFloatLE
-
readDouble
Deprecated.- Specified by:
readDoublein interfaceDataInput- Throws:
IOException
-
readDoubleLE
-
readLine
Deprecated.- Specified by:
readLinein interfaceDataInput- Throws:
IOException
-
readUTF
Deprecated.- Specified by:
readUTFin interfaceDataInput- Throws:
IOException
-
getStartOffset
public int getStartOffset()Deprecated.Getter for property startOffset.- Returns:
- Value of property startOffset.
-
setStartOffset
public void setStartOffset(int startOffset) Deprecated.Setter for property startOffset.- Parameters:
startOffset- New value of property startOffset.
-
getNioByteBuffer
Deprecated.- Returns:
- a ByteBuffer
- Throws:
IOException- on error- Since:
- 2.0.8
-