All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.ibm.as400.access.AS400JDBCInputStream

java.lang.Object
   |
   +----java.io.InputStream
           |
           +----com.ibm.as400.access.AS400JDBCInputStream

public class AS400JDBCInputStream
extends InputStream

The AS400JDBCInputStream class provides access to binary data using an input stream. The data is valid only within the current transaction.


Method Index

 o available()
Returns the number of bytes that can be read without blocking.
 o close()
Closes the stream and releases any associated system resources.
 o mark(int)
Marks the current position in the stream.
 o markSupported()
Indicates if mark() and reset() are supported.
 o read()
Reads the next byte of data.
 o read(byte[])
Reads bytes of data.
 o read(byte[], int, int)
Reads bytes of data.
 o reset()
Repositions to the marked position.
 o skip(long)
Skips over and discards data.

Methods

 o available
 public int available() throws IOException
Returns the number of bytes that can be read without blocking.

Returns:
The number of bytes that can be read without blocking.
Throws: IOException
If an input/output error occurs.
Overrides:
available in class InputStream
 o close
 public void close() throws IOException
Closes the stream and releases any associated system resources.

Throws: IOException
If an input/output error occurs.
Overrides:
close in class InputStream
 o mark
 public void mark(int readLimit)
Marks the current position in the stream. This is not supported.

Parameters:
readLimit - The read limit.
Overrides:
mark in class InputStream
 o markSupported
 public boolean markSupported()
Indicates if mark() and reset() are supported.

Returns:
Always false. mark() and reset() are not supported.
Overrides:
markSupported in class InputStream
 o read
 public int read() throws IOException
Reads the next byte of data. This method blocks until data is available, the end of the stream is detected, or an exception is thrown.

Returns:
The next byte of data as an int in the range 0 to 255, or -1 if no more data is available.
Throws: IOException
If an input/output error occurs.
Overrides:
read in class InputStream
 o read
 public int read(byte data[]) throws IOException
Reads bytes of data. This method blocks until data is available, the end of the stream is detected, or an exception is thrown.

Parameters:
data - The byte array to fill with data. This method will read as much data as possible to fill the array.
Returns:
The number of bytes of data read, or -1 if no more data is available.
Throws: IOException
If an input/output error occurs.
Overrides:
read in class InputStream
 o read
 public int read(byte data[],
                 int start,
                 int length) throws IOException
Reads bytes of data. This method blocks until data is available, the end of the stream is detected, or an exception is thrown.

Parameters:
data - The byte array to fill with data. This method will read as much data as possible to fill the array.
start - The start position in the array.
length - The maximum number of bytes to read.
Returns:
The number of bytes of data read, or -1 if no more data is available.
Throws: IOException
If an input/output error occurs.
Overrides:
read in class InputStream
 o reset
 public void reset() throws IOException
Repositions to the marked position. This is not supported.

Throws: IOException
If an input/output error occurs.
Overrides:
reset in class InputStream
 o skip
 public long skip(long length) throws IOException
Skips over and discards data.

Parameters:
length - The maximum number of bytes to skip. If negative, no bytes are skipped.
Returns:
The number of bytes skipped.
Throws: IOException
If an input/output error occurs.
Overrides:
skip in class InputStream

All Packages  Class Hierarchy  This Package  Previous  Next  Index