Save This Page
Home » iText-src-2.1.3 » com.lowagie » text » pdf » [javadoc | source]
com.lowagie.text.pdf
public class: RandomAccessFileOrArray [javadoc | source]
java.lang.Object
   com.lowagie.text.pdf.RandomAccessFileOrArray

All Implemented Interfaces:
    DataInput

An implementation of a RandomAccessFile for input only that accepts a file or a byte array as data source.
Field Summary
 MappedRandomAccessFile rf     
 RandomAccessFile trf     
 boolean plainRandomAccess     
 String filename     
 byte[] arrayIn     
 int arrayInPtr     
 byte back     
 boolean isBack     
Constructor:
 public RandomAccessFileOrArray(String filename) throws IOException 
 public RandomAccessFileOrArray(URL url) throws IOException 
 public RandomAccessFileOrArray(InputStream is) throws IOException 
 public RandomAccessFileOrArray(byte[] arrayIn) 
 public RandomAccessFileOrArray(RandomAccessFileOrArray file) 
 public RandomAccessFileOrArray(String filename,
    boolean forceRead,
    boolean plainRandomAccess) throws IOException 
Method from com.lowagie.text.pdf.RandomAccessFileOrArray Summary:
InputStreamToArray,   close,   getFilePointer,   getNioByteBuffer,   getStartOffset,   insureOpen,   isOpen,   length,   pushBack,   reOpen,   read,   read,   read,   readBoolean,   readByte,   readChar,   readCharLE,   readDouble,   readDoubleLE,   readFloat,   readFloatLE,   readFully,   readFully,   readInt,   readIntLE,   readLine,   readLong,   readLongLE,   readShort,   readShortLE,   readUTF,   readUnsignedByte,   readUnsignedInt,   readUnsignedIntLE,   readUnsignedShort,   readUnsignedShortLE,   seek,   seek,   setStartOffset,   skip,   skipBytes
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from com.lowagie.text.pdf.RandomAccessFileOrArray Detail:
 public static byte[] InputStreamToArray(InputStream is) throws IOException 
 public  void close() throws IOException 
 public int getFilePointer() throws IOException 
 public ByteBuffer getNioByteBuffer() throws IOException 
 public int getStartOffset() 
    Getter for property startOffset.
 protected  void insureOpen() throws IOException 
 public boolean isOpen() 
 public int length() throws IOException 
 public  void pushBack(byte b) 
 public  void reOpen() throws IOException 
 public int read() throws IOException 
 public int read(byte[] b) throws IOException 
 public int read(byte[] b,
    int off,
    int len) throws IOException 
 public boolean readBoolean() throws IOException 
 public byte readByte() throws IOException 
 public char readChar() throws IOException 
 public final char readCharLE() throws IOException 
    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.

 public double readDouble() throws IOException 
 public final double readDoubleLE() throws IOException 
 public float readFloat() throws IOException 
 public final float readFloatLE() throws IOException 
 public  void readFully(byte[] b) throws IOException 
 public  void readFully(byte[] b,
    int off,
    int len) throws IOException 
 public int readInt() throws IOException 
 public final int readIntLE() throws IOException 
    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.

 public String readLine() throws IOException 
 public long readLong() throws IOException 
 public final long readLongLE() throws IOException 
 public short readShort() throws IOException 
 public final short readShortLE() throws IOException 
    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.

 public String readUTF() throws IOException 
 public int readUnsignedByte() throws IOException 
 public final long readUnsignedInt() throws IOException 
    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.

 public final long readUnsignedIntLE() throws IOException 
 public int readUnsignedShort() throws IOException 
 public final int readUnsignedShortLE() throws IOException 
    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.

 public  void seek(int pos) throws IOException 
 public  void seek(long pos) throws IOException 
 public  void setStartOffset(int startOffset) 
    Setter for property startOffset.
 public long skip(long n) throws IOException 
 public int skipBytes(int n) throws IOException