public interface IfmxUDTSQLInput extends java.sql.SQLInput, SQLUDTInput
The IfmxUDTSQLInput interface extends the SQLInput interface. This interface is specifically for Informix user-defined types. It contains Informix extension methods for materializing fixed-length data.
Modifier and Type | Method and Description |
---|---|
int |
available()
Returns the number of bytes remaining in this input stream
|
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()
Gets the total length of the entire data stream.
|
byte[] |
readBytes(int maxlen)
Reads the next attribute in the stream as Java byte array.
|
Interval |
readInterval()
Reads the next attribute in the stream as a Java Interval.
|
java.lang.String |
readString(int maxlen)
Reads the next attribute in the stream as a Java String.
|
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.
|
readArray, readAsciiStream, readBigDecimal, readBinaryStream, readBlob, readBoolean, readByte, readBytes, readCharacterStream, readClob, readDate, readDouble, readFloat, readInt, readLong, readNClob, readNString, readObject, readRef, readRowId, readShort, readSQLXML, readString, readTime, readTimestamp, readURL, wasNull
int length()
Gets the total length of the entire data stream.
length
in interface SQLUDTInput
java.lang.String readString(int maxlen) throws java.sql.SQLException
Reads the next attribute in the stream as a Java String. This method is similar to SQLInput.readString(), except that it reads a fixed length of data. This method replaces SQLInput.readString() in the UDT implementation. Since the user-defined type is unknown to the driver, the user MUST supply a length in order for the driver to read in the next attribute properly.
readString
in interface SQLUDTInput
maxlen
- The maximum size of data to be read in.java.sql.SQLException
byte[] readBytes(int maxlen) throws java.sql.SQLException
readBytes
in interface SQLUDTInput
maxlen
- The maximum size of data to read in.java.sql.SQLException
Interval readInterval() throws java.sql.SQLException
readInterval
in interface SQLUDTInput
java.sql.SQLException
void setAutoAlignment(boolean value)
value
- = 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.boolean getAutoAlignment()
void skipBytes(int len) throws java.sql.SQLException
len
- Number of bytes to skip over and discard.java.sql.SQLException
int getCurrentPosition() throws java.sql.SQLException
java.sql.SQLException
void setCurrentPosition(int position) throws java.sql.SQLException
position
- java.sql.SQLException
int available()
IfxUDTInfo getUDTInfo(int xid) throws java.sql.SQLException
xid
- Is the extended id found in sysxtdtype system catalog.java.sql.SQLException
IfxUDTInfo getUDTInfo(java.lang.String name, java.lang.String owner) throws java.sql.SQLException
name
- The data type name.owner
- The owner of the data type (can be null).java.sql.SQLException