Class RandomAccessFileOrArray
- Namespace
- iTextSharp.text.pdf
- Assembly
- iTextSharp.LGPLv2.Core.dll
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)
public class RandomAccessFileOrArray
- Inheritance
-
RandomAccessFileOrArray
- Inherited Members
Constructors
RandomAccessFileOrArray(byte[])
public RandomAccessFileOrArray(byte[] arrayIn)
Parameters
arrayIn
byte[]
RandomAccessFileOrArray(Stream, bool)
public RandomAccessFileOrArray(Stream isp, bool forceRead = true)
Parameters
RandomAccessFileOrArray(string)
public RandomAccessFileOrArray(string filename)
Parameters
filename
string
RandomAccessFileOrArray(string, bool)
public RandomAccessFileOrArray(string filename, bool forceRead)
Parameters
RandomAccessFileOrArray(Uri)
public RandomAccessFileOrArray(Uri url)
Parameters
url
Uri
RandomAccessFileOrArray(RandomAccessFileOrArray)
public RandomAccessFileOrArray(RandomAccessFileOrArray file)
Parameters
Properties
FilePointer
public int FilePointer { get; }
Property Value
Length
public int Length { get; }
Property Value
StartOffset
Holds value of property startOffset.
public int StartOffset { get; set; }
Property Value
Methods
Close()
public void Close()
InputStreamToArray(Stream)
public static byte[] InputStreamToArray(Stream isp)
Parameters
isp
Stream
Returns
- byte[]
InsureOpen()
protected void InsureOpen()
IsOpen()
public bool IsOpen()
Returns
PushBack(byte)
public void PushBack(byte b)
Parameters
b
byte
ReOpen()
public void ReOpen()
Read()
public int Read()
Returns
Read(byte[])
public int Read(byte[] b)
Parameters
b
byte[]
Returns
Read(byte[], int, int)
public int Read(byte[] b, int off, int len)
Parameters
Returns
ReadBoolean()
public bool ReadBoolean()
Returns
ReadByte()
public byte ReadByte()
Returns
ReadChar()
public char ReadChar()
Returns
ReadCharLe()
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. This method blocks until the two bytes are read, the end of the stream is detected, or an exception is thrown. @exception EOFException if this stream reaches the end before reading two bytes. @exception IOException if an I/O error occurs.
public char ReadCharLe()
Returns
- char
the next two bytes of this stream as a Unicode character.
ReadDouble()
public double ReadDouble()
Returns
ReadDoubleLe()
public double ReadDoubleLe()
Returns
ReadFloat()
public float ReadFloat()
Returns
ReadFloatLe()
public float ReadFloatLe()
Returns
ReadFully(byte[])
public void ReadFully(byte[] b)
Parameters
b
byte[]
ReadFully(byte[], int, int)
public void ReadFully(byte[] b, int off, int len)
Parameters
ReadInt()
public int ReadInt()
Returns
ReadIntLe()
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. This method blocks until the four bytes are read, the end of the stream is detected, or an exception is thrown. int . @exception EOFException if this stream reaches the end before reading four bytes. @exception IOException if an I/O error occurs.
public int ReadIntLe()
Returns
- int
the next four bytes of this stream, interpreted as an
ReadLine()
public string ReadLine()
Returns
ReadLong()
public long ReadLong()
Returns
ReadLongLe()
public long ReadLongLe()
Returns
ReadShort()
public short ReadShort()
Returns
ReadShortLe()
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. 16-bit number. @exception EOFException if this stream reaches the end before reading two bytes. @exception IOException if an I/O error occurs.
public short ReadShortLe()
Returns
- short
the next two bytes of this stream, interpreted as a signed
ReadUnsignedByte()
public int ReadUnsignedByte()
Returns
ReadUnsignedInt()
Reads an unsigned 32-bit integer from this stream. This method reads 4 bytes from the stream, starting at the current stream pointer. This method blocks until the four bytes are read, the end of the stream is detected, or an exception is thrown. long . @exception EOFException if this stream reaches the end before reading four bytes. @exception IOException if an I/O error occurs.
public long ReadUnsignedInt()
Returns
- long
the next four bytes of this stream, interpreted as a
ReadUnsignedIntLe()
public long ReadUnsignedIntLe()
Returns
ReadUnsignedShort()
public int ReadUnsignedShort()
Returns
ReadUnsignedShortLe()
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. This method blocks until the two bytes are read, the end of the stream is detected, or an exception is thrown. unsigned 16-bit integer. @exception EOFException if this stream reaches the end before reading two bytes. @exception IOException if an I/O error occurs.
public int ReadUnsignedShortLe()
Returns
- int
the next two bytes of this stream, interpreted as an
Seek(int)
public void Seek(int pos)
Parameters
pos
int
Seek(long)
public void Seek(long pos)
Parameters
pos
long
Skip(long)
public long Skip(long n)
Parameters
n
long
Returns
SkipBytes(int)
public int SkipBytes(int n)
Parameters
n
int