public class IfxUDTInput extends java.lang.Object implements SQLUDTInput, IfmxUDTSQLInput
| Modifier and Type | Field and Description |
|---|---|
protected byte[] |
buf |
protected IfxConnection |
conn |
protected int |
currentPos |
protected boolean |
isNull |
protected int |
totalLength |
protected Trace |
trace |
protected int |
unreadLength |
| Modifier and Type | Method and Description |
|---|---|
int |
available()
Returns the number of bytes remaining in this input stream.
|
protected void |
checkLength(int len) |
protected int |
currentPosition() |
boolean |
getAutoAlignment()
Returns true if auto alignment is enabled and false if auto
alignment has been disabled.
|
int |
getCurrentPosition()
Returns the current position in the input stream.
|
IfxUDTInfo |
getUDTInfo(int xid)
Get general information about opaque and distinct types
and detailed information for complex types.
|
IfxUDTInfo |
getUDTInfo(java.lang.String name,
java.lang.String owner)
Get general information about opaque and distinct types
and detailed information for complex types.
|
int |
length()
Get the total length of the entire data stream.
|
java.sql.Array |
readArray()
Read an array from the stream.
|
java.io.InputStream |
readAsciiStream()
Return the next attribute in the stream as a stream of ASCII characters.
|
java.math.BigDecimal |
readBigDecimal()
Read the next attribute in the stream as a java.math.BigDecimal object.
|
java.io.InputStream |
readBinaryStream()
Return the next attribute in the stream as a stream of uninterpreted
bytes.
|
java.sql.Blob |
readBlob()
Read a BLOB from the stream.
|
boolean |
readBoolean()
Read the next attribute in the stream as a Java boolean.
|
byte |
readByte()
Read the next attribute in the stream as a Java byte.
|
byte[] |
readBytes()
Read the next attribute in the stream as an array of bytes.
|
byte[] |
readBytes(int len)
Read the next attribute in the stream as an array of bytes.
|
java.io.Reader |
readCharacterStream()
Return the next attribute in the stream as a stream of Unicode characters.
|
java.sql.Clob |
readClob()
Read a CLOB from the stream.
|
java.sql.Date |
readDate()
Read the next attribute in the stream as a java.sql.Date object.
|
double |
readDouble()
Read the next attribute in the stream as a Java double.
|
float |
readFloat()
Read the next attribute in the stream as a Java float.
|
int |
readInt()
Read the next attribute in the stream as a Java int.
|
Interval |
readInterval()
Read the next attribute in the stream as an Interval object
(IntervalYM or IntervalMF).
|
long |
readLong()
Read the next attribute in the stream as a Java long.
|
long |
readLongBigint()
Read the next attribute in the stream as a Java long.
|
java.sql.NClob |
readNClob() |
java.lang.String |
readNString() |
java.lang.Object |
readObject()
Return the datum at the head of the stream as a Java object.
|
java.sql.Ref |
readRef()
Read a REF(<structured-type>) from the stream.
|
java.sql.RowId |
readRowId() |
short |
readShort()
Read the next attribute in the stream as a Java short.
|
java.sql.SQLXML |
readSQLXML() |
java.lang.String |
readString()
Read the next attribute in the stream as a Java String.
|
java.lang.String |
readString(int len)
Read the next attribute in the stream as a Java String.
|
java.lang.String |
readString(int len,
java.lang.String dbEnc)
Read the next attribute in the stream as a Java String.
|
java.sql.Time |
readTime()
Read the next attribute in the stream as a java.sql.Time object.
|
java.sql.Timestamp |
readTimestamp()
Read the next attribute in the stream as a java.sql.Timestamp object.
|
java.net.URL |
readURL() |
protected void |
reset() |
void |
setAutoAlignment(boolean value)
Enable or disable automatic alignment.
|
void |
setCurrentPosition(int position)
Resets the current position.
|
void |
skipBytes(int len)
Skips over and discards len bytes of data from the input stream.
|
boolean |
wasNull() |
protected IfxConnection conn
protected boolean isNull
protected byte[] buf
protected int totalLength
protected int unreadLength
protected int currentPos
protected Trace trace
public int length()
SQLUDTInputGet the total length of the entire data stream.
length in interface IfmxUDTSQLInputlength in interface SQLUDTInputpublic java.lang.String readString()
throws java.sql.SQLException
readString in interface java.sql.SQLInputjava.sql.SQLExceptionpublic byte readByte()
throws java.sql.SQLException
readByte in interface java.sql.SQLInputjava.sql.SQLExceptionpublic short readShort()
throws java.sql.SQLException
readShort in interface java.sql.SQLInputjava.sql.SQLExceptionpublic int readInt()
throws java.sql.SQLException
readInt in interface java.sql.SQLInputjava.sql.SQLExceptionpublic java.lang.String readString(int len)
throws java.sql.SQLException
readString in interface IfmxUDTSQLInputreadString in interface SQLUDTInputlen - the maximum size of data to read in.java.sql.SQLExceptionpublic java.lang.String readString(int len,
java.lang.String dbEnc)
throws java.sql.SQLException
java.sql.SQLExceptionpublic boolean readBoolean()
throws java.sql.SQLException
readBoolean in interface java.sql.SQLInputjava.sql.SQLExceptionpublic long readLong()
throws java.sql.SQLException
readLong in interface java.sql.SQLInputjava.sql.SQLExceptionpublic long readLongBigint()
throws java.sql.SQLException
java.sql.SQLExceptionpublic float readFloat()
throws java.sql.SQLException
readFloat in interface java.sql.SQLInputjava.sql.SQLExceptionpublic double readDouble()
throws java.sql.SQLException
readDouble in interface java.sql.SQLInputjava.sql.SQLExceptionpublic java.math.BigDecimal readBigDecimal()
throws java.sql.SQLException
readBigDecimal in interface java.sql.SQLInputjava.sql.SQLExceptionpublic byte[] readBytes()
throws java.sql.SQLException
readBytes in interface java.sql.SQLInputjava.sql.SQLExceptionpublic byte[] readBytes(int len)
throws java.sql.SQLException
readBytes in interface IfmxUDTSQLInputreadBytes in interface SQLUDTInputlen - the maximum size of data to read in.java.sql.SQLExceptionpublic java.sql.Date readDate()
throws java.sql.SQLException
readDate in interface java.sql.SQLInputjava.sql.SQLExceptionpublic java.sql.Timestamp readTimestamp()
throws java.sql.SQLException
readTimestamp in interface java.sql.SQLInputjava.sql.SQLExceptionpublic java.io.Reader readCharacterStream()
throws java.sql.SQLException
readCharacterStream in interface java.sql.SQLInputjava.sql.SQLExceptionpublic java.io.InputStream readAsciiStream()
throws java.sql.SQLException
readAsciiStream in interface java.sql.SQLInputjava.sql.SQLExceptionpublic java.io.InputStream readBinaryStream()
throws java.sql.SQLException
readBinaryStream in interface java.sql.SQLInputjava.sql.SQLExceptionpublic java.lang.Object readObject()
throws java.sql.SQLException
readObject in interface java.sql.SQLInputjava.sql.SQLExceptionpublic java.sql.Ref readRef()
throws java.sql.SQLException
readRef in interface java.sql.SQLInputjava.sql.SQLExceptionpublic java.sql.Blob readBlob()
throws java.sql.SQLException
readBlob in interface java.sql.SQLInputjava.sql.SQLExceptionpublic java.sql.Clob readClob()
throws java.sql.SQLException
readClob in interface java.sql.SQLInputjava.sql.SQLExceptionpublic java.sql.Array readArray()
throws java.sql.SQLException
readArray in interface java.sql.SQLInputjava.sql.SQLExceptionpublic Interval readInterval() throws java.sql.SQLException
readInterval in interface IfmxUDTSQLInputreadInterval in interface SQLUDTInputjava.sql.SQLExceptionpublic void setAutoAlignment(boolean value)
setAutoAlignment in interface IfmxUDTSQLInputvalue - = true then alignment should be handles automatically.
If value = false then no alignment is done. It's the user's respon-
sibility to call skipBytes(int) to handle alignment.public boolean getAutoAlignment()
getAutoAlignment in interface IfmxUDTSQLInputpublic void skipBytes(int len)
throws java.sql.SQLException
skipBytes in interface IfmxUDTSQLInputlen - Number of bytes to skip over and discard.java.sql.SQLExceptionpublic int getCurrentPosition()
getCurrentPosition in interface IfmxUDTSQLInputpublic void setCurrentPosition(int position)
throws java.sql.SQLException
setCurrentPosition in interface IfmxUDTSQLInput - java.sql.SQLExceptionpublic int available()
available in interface IfmxUDTSQLInputpublic IfxUDTInfo getUDTInfo(int xid) throws java.sql.SQLException
getUDTInfo in interface IfmxUDTSQLInputxid - Is the extended id found in sysxtdtype system catalog.java.sql.SQLExceptionpublic IfxUDTInfo getUDTInfo(java.lang.String name, java.lang.String owner) throws java.sql.SQLException
getUDTInfo in interface IfmxUDTSQLInputname - The data type name.owner - The owner of the data type (can be null).java.sql.SQLExceptionpublic java.net.URL readURL()
throws java.sql.SQLException
readURL in interface java.sql.SQLInputjava.sql.SQLExceptionpublic java.sql.NClob readNClob()
throws java.sql.SQLException
readNClob in interface java.sql.SQLInputjava.sql.SQLExceptionpublic java.lang.String readNString()
throws java.sql.SQLException
readNString in interface java.sql.SQLInputjava.sql.SQLExceptionpublic java.sql.RowId readRowId()
throws java.sql.SQLException
readRowId in interface java.sql.SQLInputjava.sql.SQLExceptionpublic java.sql.SQLXML readSQLXML()
throws java.sql.SQLException
readSQLXML in interface java.sql.SQLInputjava.sql.SQLExceptionprotected int currentPosition()
protected void reset()
protected void checkLength(int len)
throws java.sql.SQLException
java.sql.SQLExceptionpublic java.sql.Time readTime()
throws java.sql.SQLException
readTime in interface java.sql.SQLInputjava.sql.SQLExceptionpublic boolean wasNull()
wasNull in interface java.sql.SQLInput