com.informix.jdbc

## Class IfxComplexInput

- java.lang.Object
- - com.informix.jdbc.IfxComplexInput

All Implemented Interfaces:
  IfmxComplexSQLInput, java.sql.SQLInput

    public class IfxComplexInput
    extends java.lang.Object
    implements IfmxComplexSQLInput

### Field Summary

Fields
`protected byte[]` `buf`
`protected IfxConnection` `conn`
`protected int` `currentPos`
`protected boolean` `isNull`
`protected int` `totalLength`
`protected Trace` `trace`
`protected int` `unreadLength`

### Method Summary

All Methods Instance Methods Concrete Methods
`protected int` `available()`
`protected void` `checkLength(int len)`
`protected int` `currentPosition()`
`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()`
`java.sql.Array` `readArray()` readArray() - this is only called by the user's java object.
`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 as a Java.math.BigDecimal.
`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 as a Java boolean.
`byte` `readByte()` Read the next attribute 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 as a java.sql.date.
`double` `readDouble()` Read the next attribute as a Java double.
`float` `readFloat()` Read the next attribute as a Java float.
`int` `readInt()` Read the next attribute as a Java int.
`Interval` `readInterval()` Reads the next attribute as an Informix Interval.
`long` `readLong()` Read the next attribute as a Java long.
`long` `readLongBigint()` Read the next attribute as a Java long.
`java.sql.NClob` `readNClob()`
`java.lang.String` `readNString()`
`java.lang.Object` `readObject()` An Informix extension to SQLInput which allows java.util.Collection, IntervalDF and IntervalYM objects to be read.
`java.sql.Ref` `readRef()` Read a REF(<structured-type>) from the stream.
`java.sql.RowId` `readRowId()`
`short` `readShort()` Read the next attribute as a Java short.
`java.sql.SQLXML` `readSQLXML()`
`java.lang.String` `readString()` Read the next attribute as a Java String.
`java.lang.String` `readString(java.util.Collection<java.lang.String> collObj)` Read the next attribute as a Java String.
`java.sql.Time` `readTime()` Read the next attribute as a Java.sql.Time.
`java.sql.Timestamp` `readTimestamp()` Read the next attribute as a Java.sql.Timestamp.
`java.net.URL` `readURL()`
`protected void` `reset()`
`protected void` `skipBytes(int len)`
`boolean` `wasNull()`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface java.sql.SQLInput

`readAsciiStream, readBinaryStream, readBytes, readCharacterStream, readObject, readRef, wasNull`

### Field Detail

#### conn

    protected IfxConnection conn

#### isNull

    protected boolean isNull

#### buf

    protected byte[] buf

#### totalLength

    protected int totalLength

#### unreadLength

    protected int unreadLength

#### currentPos

    protected int currentPos

#### trace

    protected Trace trace

### Method Detail

#### readBlob

    public java.sql.Blob readBlob()
                           throws java.sql.SQLException

Read a BLOB from the stream.

Specified by:
  `readBlob` in interface `java.sql.SQLInput`
Returns:
  an object representing a BLOB
Throws:
  `java.sql.SQLException`

#### readClob

    public java.sql.Clob readClob()
                           throws java.sql.SQLException

Read a Clob from the stream.

Specified by:
  `readClob` in interface `java.sql.SQLInput`
Returns:
  an object representing a CLOB
Throws:
  `java.sql.SQLException`

#### readByte

    public byte readByte()
                  throws java.sql.SQLException

Read the next attribute as a Java byte.

Specified by:
  `readByte` in interface `java.sql.SQLInput`
Returns:
  the attribute; if the value is null return null
Throws:
  `java.sql.SQLException`

#### readDate

    public java.sql.Date readDate()
                           throws java.sql.SQLException

Read the next attribute as a java.sql.date.

Specified by:
  `readDate` in interface `java.sql.SQLInput`
Returns:
  the attribute; if the value is null return null
Throws:
  `java.sql.SQLException`

#### readDouble

    public double readDouble()
                      throws java.sql.SQLException

Read the next attribute as a Java double.

Specified by:
  `readDouble` in interface `java.sql.SQLInput`
Returns:
  the attribute; if the value is null return null
Throws:
  `java.sql.SQLException`

#### readFloat

    public float readFloat()
                    throws java.sql.SQLException

Read the next attribute as a Java float.

Specified by:
  `readFloat` in interface `java.sql.SQLInput`
Returns:
  the attribute; if the value is null return null
Throws:
  `java.sql.SQLException`

#### readInt

    public int readInt()
                throws java.sql.SQLException

Read the next attribute as a Java int.

Specified by:
  `readInt` in interface `java.sql.SQLInput`
Returns:
  the attribute; if the value is null return null
Throws:
  `java.sql.SQLException`

#### readLong

    public long readLong()
                  throws java.sql.SQLException

Read the next attribute as a Java long.

Specified by:
  `readLong` in interface `java.sql.SQLInput`
Returns:
  the attribute; if the value is null return null
Throws:
  `java.sql.SQLException`

#### readLongBigint

    public long readLongBigint()
                        throws java.sql.SQLException

Read the next attribute as a Java long.

Returns:
  the attribute; if the value is null return null
Throws:
  `java.sql.SQLException`

#### readShort

    public short readShort()
                    throws java.sql.SQLException

Read the next attribute as a Java short.

Specified by:
  `readShort` in interface `java.sql.SQLInput`
Returns:
  the attribute; if the value is null return null
Throws:
  `java.sql.SQLException`

#### readTime

    public java.sql.Time readTime()
                           throws java.sql.SQLException

Read the next attribute as a Java.sql.Time.

Specified by:
  `readTime` in interface `java.sql.SQLInput`
Returns:
  the attribute; if the value is null return null
Throws:
  `java.sql.SQLException`

#### readTimestamp

    public java.sql.Timestamp readTimestamp()
                                     throws java.sql.SQLException

Read the next attribute as a Java.sql.Timestamp.

Specified by:
  `readTimestamp` in interface `java.sql.SQLInput`
Returns:
  the attribute; if the value is null return null
Throws:
  `java.sql.SQLException`

#### readInterval

    public Interval readInterval()
                          throws java.sql.SQLException

Description copied from interface: `IfmxComplexSQLInput`

Reads the next attribute as an Informix Interval.

Specified by:
  `readInterval` in interface `IfmxComplexSQLInput`
Returns:
  the attribute as an Informix Interval.
Throws:
  `java.sql.SQLException`
See Also:
  `Interval`, `IntervalYM`, `IntervalDF`

#### readBigDecimal

    public java.math.BigDecimal readBigDecimal()
                                        throws java.sql.SQLException

Read the next attribute as a Java.math.BigDecimal.

Specified by:
  `readBigDecimal` in interface `java.sql.SQLInput`
Returns:
  the attribute; if the value is null return null
Throws:
  `java.sql.SQLException`

#### readBoolean

    public boolean readBoolean()
                        throws java.sql.SQLException

Read the next attribute as a Java boolean.

Specified by:
  `readBoolean` in interface `java.sql.SQLInput`
Returns:
  the attribute; if the value is null return null
Throws:
  `java.sql.SQLException`

#### readString

    public java.lang.String readString()
                                throws java.sql.SQLException

Read the next attribute as a Java String.

Specified by:
  `readString` in interface `java.sql.SQLInput`
Returns:
  the attribute; if the value is null return null
Throws:
  `java.sql.SQLException`

#### readObject

    public java.lang.Object readObject()
                                throws java.sql.SQLException

An Informix extension to SQLInput which allows java.util.Collection, IntervalDF and IntervalYM objects to be read.

Specified by:
  `readObject` in interface `java.sql.SQLInput`
Returns:
  the attribute as a Object
Throws:
  `java.sql.SQLException`

#### readString

    public java.lang.String readString(java.util.Collection<java.lang.String> collObj)
                                throws java.sql.SQLException

Read the next attribute as a Java String.

Parameters:
  `collObj` - - Collection Object
Returns:
  the attribute; if the value is null return null
Throws:
  `java.sql.SQLException`

#### readArray

    public java.sql.Array readArray()
                             throws java.sql.SQLException

readArray() - this is only called by the user's java object. So this is a nested collection. We don't want to materialize the data yet, the user will call one of the methods in the Array class to do that.

Specified by:
  `readArray` in interface `java.sql.SQLInput`
Returns:
  an object representing an SQL array
Throws:
  `java.sql.SQLException`

#### getUDTInfo

    public IfxUDTInfo getUDTInfo(int xid)
                          throws java.sql.SQLException

Get general information about opaque and distinct types and detailed information for complex types. Calls IfmxConnection.getUDTInfo(int) param xid Is the extended id found in sysxtdtype system catalog.

Specified by:
  `getUDTInfo` in interface `IfmxComplexSQLInput`
Parameters:
  `xid` - Is the extended id found in sysxtdtype system catalog.
Returns:
  The detailed type information as an Informix IfxUDTInfo.
Throws:
  `java.sql.SQLException`

#### getUDTInfo

    public IfxUDTInfo getUDTInfo(java.lang.String name,
                                 java.lang.String owner)
                          throws java.sql.SQLException

Get general information about opaque and distinct types and detailed information for complex types. Calls IfmxConnection.getUDTInfo(String name, String owner)

Specified by:
  `getUDTInfo` in interface `IfmxComplexSQLInput`
Parameters:
  `name` - The data type name.
  `owner` - The owner of the data type (can be null).
Returns:
  The detailed type information as an Informix IfxUDTInfo.
Throws:
  `java.sql.SQLException`

#### readURL

    public java.net.URL readURL()
                         throws java.sql.SQLException

Specified by:
  `readURL` in interface `java.sql.SQLInput`
Throws:
  `java.sql.SQLException`

#### readNClob

    public java.sql.NClob readNClob()
                             throws java.sql.SQLException

Specified by:
  `readNClob` in interface `java.sql.SQLInput`
Throws:
  `java.sql.SQLException`

#### readNString

    public java.lang.String readNString()
                                 throws java.sql.SQLException

Specified by:
  `readNString` in interface `java.sql.SQLInput`
Throws:
  `java.sql.SQLException`

#### readRowId

    public java.sql.RowId readRowId()
                             throws java.sql.SQLException

Specified by:
  `readRowId` in interface `java.sql.SQLInput`
Throws:
  `java.sql.SQLException`

#### readSQLXML

    public java.sql.SQLXML readSQLXML()
                               throws java.sql.SQLException

Specified by:
  `readSQLXML` in interface `java.sql.SQLInput`
Throws:
  `java.sql.SQLException`

#### skipBytes

    protected void skipBytes(int len)
                      throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### currentPosition

    protected int currentPosition()

#### length

    public int length()

#### available

    protected int available()

#### reset

    protected void reset()

#### checkLength

    protected void checkLength(int len)
                        throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### readBytes

    public byte[] readBytes()
                     throws java.sql.SQLException

Read the next attribute in the stream as an array of bytes.

Specified by:
  `readBytes` in interface `java.sql.SQLInput`
Returns:
  the attribute; if the value is SQL NULL, return null.
Throws:
  `java.sql.SQLException`

#### readBytes

    public byte[] readBytes(int len)
                     throws java.sql.SQLException

Read the next attribute in the stream as an array of bytes.

Returns:
  the attribute; if the value is SQL NULL, return null.
Throws:
  `java.sql.SQLException`

#### readCharacterStream

    public java.io.Reader readCharacterStream()
                                       throws java.sql.SQLException

Return the next attribute in the stream as a stream of Unicode characters.

Specified by:
  `readCharacterStream` in interface `java.sql.SQLInput`
Returns:
  the attribute; if the value is SQL NULL, return null.
Throws:
  `java.sql.SQLException`

#### readAsciiStream

    public java.io.InputStream readAsciiStream()
                                        throws java.sql.SQLException

Return the next attribute in the stream as a stream of ASCII characters.

Specified by:
  `readAsciiStream` in interface `java.sql.SQLInput`
Returns:
  the attribute; if the value is SQL NULL, return null.
Throws:
  `java.sql.SQLException`

#### readBinaryStream

    public java.io.InputStream readBinaryStream()
                                         throws java.sql.SQLException

Return the next attribute in the stream as a stream of uninterpreted bytes.

Specified by:
  `readBinaryStream` in interface `java.sql.SQLInput`
Returns:
  the attribute; if the value is SQL NULL, return null.
Throws:
  `java.sql.SQLException`

#### readRef

    public java.sql.Ref readRef()
                         throws java.sql.SQLException

Read a REF(<structured-type>) from the stream.

Specified by:
  `readRef` in interface `java.sql.SQLInput`
Returns:
  an object representing data of an SQL REF Type
Throws:
  `java.sql.SQLException`

#### wasNull

    public boolean wasNull()

Specified by:
  `wasNull` in interface `java.sql.SQLInput`
Returns:
  true iff the most recently gotten SQL value was null.