ElegantJ PDF Library Java API Specification v1.1

com.elegantj.pdf
Class RandomAccessBytesArray

java.lang.Object
  extended bycom.elegantj.pdf.RandomAccessBytesArray

public class RandomAccessBytesArray
extends java.lang.Object

Provides the Random Access Bytes Array


Field Summary
protected  byte[] randomAccessBytesArray
          Contains the random access bytes array
protected  int randomAccessBytesArrayPointer
          The pointer to the random access bytes array
 
Constructor Summary
RandomAccessBytesArray(byte[] bytes)
          Constructs the RandomAccessBytesArray from the specified randomAccessBytesArray
 
Method Summary
 int getPointer()
          Returns the current position of the pointer
 int length()
          Returns the length of the Bytes Array
 int read()
          Reads the byte from the array
 int read(byte[] b)
          Reads the bytes and stores to the specified bytes array
 int read(byte[] b, int off, int len)
          Reads the bytes from the specified offset to length and save its to the specified byte array
 boolean readBoolean()
          Reads the boolean
 byte readByte()
          Reads the byte
 char readChar()
          Reads the char
 double readDouble()
          Reads the double
 float readFloat()
          Reads the float
 void readFully(byte[] b)
          Reads the bytes and save it to the specified bytes array
 void readFully(byte[] b, int off, int len)
          Reads the bytes and save it to the specified bytes array
 int readInt()
          Reads the int
 java.lang.String readLine()
          Reads the line
 long readLong()
          Reads the long
 short readShort()
          Reads the short
 int readUnsignedByte()
          Reads the unsigned byte
 int readUnsignedShort()
          Reads the unsigned short
 void reset()
          Makes the array pointer, to point at the starting position
 void seek(int position)
          Sets the pointer to the specified position
 int skipBytes(int n)
          Skip specified bytes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

randomAccessBytesArray

protected byte[] randomAccessBytesArray
Contains the random access bytes array


randomAccessBytesArrayPointer

protected int randomAccessBytesArrayPointer
The pointer to the random access bytes array

Constructor Detail

RandomAccessBytesArray

public RandomAccessBytesArray(byte[] bytes)
Constructs the RandomAccessBytesArray from the specified randomAccessBytesArray

Method Detail

read

public int read()
         throws java.io.IOException
Reads the byte from the array

Throws:
java.io.IOException

read

public int read(byte[] b,
                int off,
                int len)
         throws java.io.IOException
Reads the bytes from the specified offset to length and save its to the specified byte array

Parameters:
b - The array in to which the read bytes are stored
off - The offset from which read started
len - The length up to which byte is read
Returns:
int The no of bytes are read
Throws:
java.io.IOException

read

public int read(byte[] b)
         throws java.io.IOException
Reads the bytes and stores to the specified bytes array

Parameters:
b - The bytes array in to which bytes stored
Returns:
int The no of bytes are read
Throws:
java.io.IOException

readFully

public void readFully(byte[] b)
               throws java.io.IOException
Reads the bytes and save it to the specified bytes array

Throws:
java.io.IOException

readFully

public void readFully(byte[] b,
                      int off,
                      int len)
               throws java.io.IOException
Reads the bytes and save it to the specified bytes array

Throws:
java.io.IOException

skipBytes

public int skipBytes(int n)
              throws java.io.IOException
Skip specified bytes

Parameters:
n - The specified bytes which are to be skipped
Returns:
The actual no of bytes skipped
Throws:
java.io.IOException

reset

public void reset()
           throws java.io.IOException
Makes the array pointer, to point at the starting position

Throws:
java.io.IOException

length

public int length()
           throws java.io.IOException
Returns the length of the Bytes Array

Throws:
java.io.IOException

seek

public void seek(int position)
          throws java.io.IOException
Sets the pointer to the specified position

Parameters:
position - The specified positoin
Throws:
java.io.IOException

getPointer

public int getPointer()
               throws java.io.IOException
Returns the current position of the pointer

Returns:
The current position of the pointer
Throws:
java.io.IOException

readBoolean

public boolean readBoolean()
                    throws java.io.IOException
Reads the boolean

Throws:
java.io.IOException

readByte

public byte readByte()
              throws java.io.IOException
Reads the byte

Throws:
java.io.IOException

readUnsignedByte

public int readUnsignedByte()
                     throws java.io.IOException
Reads the unsigned byte

Throws:
java.io.IOException

readShort

public short readShort()
                throws java.io.IOException
Reads the short

Throws:
java.io.IOException

readUnsignedShort

public int readUnsignedShort()
                      throws java.io.IOException
Reads the unsigned short

Throws:
java.io.IOException

readChar

public char readChar()
              throws java.io.IOException
Reads the char

Throws:
java.io.IOException

readInt

public int readInt()
            throws java.io.IOException
Reads the int

Throws:
java.io.IOException

readLong

public long readLong()
              throws java.io.IOException
Reads the long

Throws:
java.io.IOException

readFloat

public float readFloat()
                throws java.io.IOException
Reads the float

Throws:
java.io.IOException

readDouble

public double readDouble()
                  throws java.io.IOException
Reads the double

Throws:
java.io.IOException

readLine

public java.lang.String readLine()
                          throws java.io.IOException
Reads the line

Throws:
java.io.IOException

ElegantJ PDF Library Java API Specification v1.1

For any feedback, suggestion, or query, please revert back to support@elegantjpdf.com

Copyright(c)
Elegant Microweb Technologies Pvt. Ltd.
www.elegantmicroweb.com
www.elegantjpdf.com
All Rights Reserved.