public abstract boolean relative(int n) throws SQLException
If n>0, positions the iterator on the row that is n rows after the current row. If
n<0, positions the iterator on the row that is n rows before the current row. If
n=0, positions the iterator on the current row.
The cursor must be on a valid row of the result table before you can use this
method. If the cursor is before the first row or after the last throw, the method
throws an SQLException.
Suppose that m is the number of rows in the result table and x is the current
row number in the result table. If n>0 and x+n>m, the iterator is positioned
after the last row. If n<0 and x+n<1, the iterator is positioned before the first
row.
Returns true if the iterator is on a row. Otherwise, returns false.
setFetchDirection(int)
Format:
public abstract void setFetchDirection (int) throws SQLException
Gives the SQLJ runtime environment a hint as to the direction in which rows
of this iterator object are processed. Possible values are:
sqlj.runtime.ResultSetIterator.FETCH_FORWARD
Rows are processed in a forward direction, from first to last.
sqlj.runtime.ResultSetIterator.FETCH_REVERSE
Rows are processed in a backward direction, from last to first.
sqlj.runtime.ResultSetIterator.FETCH_UNKNOWN
The order of processing is not known.
Related tasks
“Using scrollable iterators in an SQLJ application” on page 130
sqlj.runtime.AsciiStream class
The sqlj.runtime.AsciiStream class is for an input stream of ASCII data with a
specified length.
The sqlj.runtime.AsciiStream class is derived from the java.io.InputStream
class, and extends the sqlj.runtime.StreamWrapper class. SQLJ interprets the bytes
in an sqlj.runtime.AsciiStream object as ASCII characters. An InputStream object
with ASCII characters needs to be passed as a sqlj.runtime.AsciiStream object.
Constructors
AsciiStream(InputStream)
Format:
public AsciiStream(java.io.InputStream input-stream)
Creates an ASCII java.io.InputStream object with an unspecified length.
Parameters:
input-stream
The InputStream object that SQLJ interprets as an AsciiStream object.
AsciiStream(InputStream, int)
Format:
public AsciiStream(java.io.InputStream input-stream, int length)
304 Application Programming Guide and Reference for Java
™