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