Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Data Visualization Components
11g Release 1 (11.1.1)

E12063-03


oracle.dss.util.xdo.common.io
Interface RandomAccessFileOrMemory

All Known Implementing Classes:
ByteArray

public interface RandomAccessFileOrMemory

Random access interface for File or Memory The following classes implement this interface: - BufferedRandomAccessFile - ByteArray


Field Summary
static java.lang.String RCS_ID
           

 

Method Summary
 void close()
          Close
 long getFilePointer()
          Returns the position.
 long length()
          Returns the length of this file or memory.
 int read()
          Read a byte of data
 int read(byte[] b)
          Reads up to b.length bytes of data from this file into an array of bytes.
 int read(byte[] b, int off, int len)
          Reads up to len bytes of data from this file into an array of bytes.
 void seek(long pos)
          Seek the position
 void setLength(long newLength)
          Set the file length or memory size.
 int skipBytes(int n)
          Attempts to skip over n bytes of input discarding the skipped bytes.
 void write(byte[] b)
          Writes b.length bytes from the specified byte array
 void write(byte[] b, int off, int len)
          Writes len bytes from the specified byte array.
 void write(int b)
          Writes the specified byte.

 

Field Detail

RCS_ID

static final java.lang.String RCS_ID
See Also:
Constant Field Values

Method Detail

read

int read()
         throws java.io.IOException
Read a byte of data
Returns:
the next byte of data, or -1 if the end of the file has been reached
Throws:
java.io.IOException

read

int read(byte[] b)
         throws java.io.IOException
Reads up to b.length bytes of data from this file into an array of bytes. This method blocks until at least one byte of input is available.
Parameters:
buf -
Returns:
the total number of bytes read into the buffer, or -1 if there is no more data because the end of this file has been reached
Throws:
java.io.IOException

read

int read(byte[] b,
         int off,
         int len)
         throws java.io.IOException
Reads up to len bytes of data from this file into an array of bytes. This method blocks until at least one byte of input is available.
Parameters:
b - the buffer into which the data is read.
off - the start offset of the data.
len - the maximum number of bytes read.
Returns:
the total number of bytes read into the buffer, or -1 if there is no more data because the end of the file has been reached.
Throws:
java.io.IOException

skipBytes

int skipBytes(int n)
              throws java.io.IOException
Attempts to skip over n bytes of input discarding the skipped bytes.
Parameters:
n - the number of bytes to be skipped.
Returns:
the actual number of bytes skipped.
Throws:
java.io.IOException

write

void write(int b)
           throws java.io.IOException
Writes the specified byte.
Parameters:
b - the byte to be written.
Throws:
java.io.IOException

write

void write(byte[] b)
           throws java.io.IOException
Writes b.length bytes from the specified byte array
Parameters:
b - the data.
Throws:
java.io.IOException

write

void write(byte[] b,
           int off,
           int len)
           throws java.io.IOException
Writes len bytes from the specified byte array.
Parameters:
b - the data.
off - the start offset in the data.
len - the number of bytes to write.
Throws:
java.io.IOException

getFilePointer

long getFilePointer()
Returns the position.
Returns:

seek

void seek(long pos)
          throws java.io.IOException
Seek the position
Parameters:
pos -
Throws:
java.io.IOException

length

long length()
            throws java.io.IOException
Returns the length of this file or memory.
Returns:
the length of this file or memory, measured in bytes.
Throws:
java.io.IOException

setLength

void setLength(long newLength)
               throws java.io.IOException
Set the file length or memory size.
Throws:
java.io.IOException

close

void close()
           throws java.io.IOException
Close
Throws:
java.io.IOException

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Data Visualization Components
11g Release 1 (11.1.1)

E12063-03


Copyright © 1997, 2009, Oracle. All rights reserved.