Skip navigation links

Oracle® Database XML Java API Reference 11g Release 2 (11.2) E10769-01

## oracle.xdb
Class RealInputStream

`java.lang.Object
java.io.InputStream
oracle.xdb.RealInputStream`

All Implemented Interfaces:
  java.io.Closeable

      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
  Overrides:
    `read` in class `java.io.InputStream`
  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
  Specified by:
    `read` in class `java.io.InputStream`
  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
  Overrides:
    `markSupported` in class `java.io.InputStream`
  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
  Overrides:
    `read` in class `java.io.InputStream`
  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
  Specified by:
    `close` in interface `java.io.Closeable`
  Overrides:
    `close` in class `java.io.InputStream`

Skip navigation links

Oracle® Database XML Java API Reference 11g Release 2 (11.2) E10769-01

Copyright © 2003, 2009, Oracle and/or its affiliates. All rights reserved.