Oracle® Database XML Java API Reference
10g Release 2 (10.2)

B14293-01


oracle.xdb
Class RealInputStream

java.lang.Object
  extended byjava.io.InputStream
      extended byoracle.xdb.RealInputStream


public class RealInputStream
extends java.io.InputStream

Class that provides an inputstream abstraction to support reading from an underlying oracle stream.


Field Summary
static int KGHSSTREAM
Constant to denote a kghsstream.
static int OCISTREAM
Constant to denote an ocistream.

Constructor Summary
RealInputStream(long c_errhp, long c_state)
Public constructor.
RealInputStream(long c_errhp, long c_state, int m_type, long m_gp)
Public constructor.

Method Summary
void close()
Function to close the RealInputStream
boolean markSupported()
Function to check if "mark" and "reset" are supported
int read()
Function to read the next byte of data
int read(byte[] b)
Function to read upto b.length bytes of data into a byte array
int read(byte[] b, int off, int len)
Function to read upto "len" bytes of data into a byte array

Methods inherited from class java.io.InputStream
available, mark, reset, skip

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

OCISTREAM

public static final int OCISTREAM
Constant to denote an ocistream.
See Also:
Constant Field Values

KGHSSTREAM

public static final int KGHSSTREAM
Constant to denote a kghsstream.
See Also:
Constant Field Values

Constructor Detail

RealInputStream

public RealInputStream(long c_errhp,
                       long c_state)
Public constructor.
Parameters:
c_errhp - Pointer to the C error handler.
c_state - Pointer to the corresponding C state.

RealInputStream

public RealInputStream(long c_errhp,
                       long c_state,
                       int m_type,
                       long m_gp)
Public constructor.
Parameters:
c_errhp - Pointer to the C error handler.
c_state - Pointer to the corresponding C state.
m_type - The stream type.
m_gp - Pointer to the generic PGA.

Method Detail

read

public int read(byte[] b)
Function to read upto b.length bytes of data into a byte array
Parameters:
b - The byte array to read into
Returns:
The total number of bytes read into the buffer (-1) if the end of the stream is reached

read

public int read()
Function to read the next byte of data
Returns:
The next byte of data (-1) if the end of the stream is reached

markSupported

public boolean markSupported()
Function to check if "mark" and "reset" are supported
Returns:
FALSE indicating that these operations are not supported

read

public int read(byte[] b,
                int off,
                int len)
Function to read upto "len" bytes of data into a byte array
Parameters:
b - The byte array to read into
off - Start offset of the data
len - The maximum number of bytes to read
Returns:
The total number of bytes read into the buffer (-1) if the end of the stream is reached

close

public void close()
Function to close the RealInputStream

Oracle® Database XML Java API Reference
10g Release 2 (10.2)

B14293-01


Copyright © 2003, 2005, Oracle. All rights reserved.