com.informix.jdbc

## Class IfxComplexOutput

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

All Implemented Interfaces:
  IfmxComplexSQLOutput, java.sql.SQLOutput

    public class IfxComplexOutput
    extends java.lang.Object
    implements IfmxComplexSQLOutput

### Field Summary

Fields
`protected IfxConnection` `conn`
`protected Trace` `trace`

### Method Summary

Methods
`protected java.lang.String` `getExtendedName()`
`static int` `getUDToffset(int dataStart, Trace trace)`
`byte[]` `toByteArray()`
`void` `writeArray(java.sql.Array arr)` Write an array to the stream.
`void` `writeAsciiStream(java.io.InputStream x)` Return the next attribute to the stream as a stream of ASCII characters.
`void` `writeBigDecimal(java.math.BigDecimal bd)` Write a BigDecimal from the collection to the server.
`void` `writeBinaryStream(java.io.InputStream is)` Write the InputStream from the collection to the server.
`void` `writeBlob(java.sql.Blob blob)` Writes the Blob object from the collection to the server.
`void` `writeBoolean(boolean bool)` Writes the boolean from the collection to the server.
`void` `writeByte(byte b)` Writes the byte from the collection to the server.
`void` `writeBytes(byte[] x)` Write the next attribute to the stream as an array of bytes.
`void` `writeBytes(byte[] x, int len)`
`void` `writeCharacterStream(java.io.Reader x)` Return the next attribute to the stream as a stream of Unicode characters.
`void` `writeClob(java.sql.Clob clob)` Writes the Clob object from the collection to the server.
`void` `writeDate(java.sql.Date d)` Writes the Date from the collection to the server.
`void` `writeDouble(double d)` Writes the double from the collection to the server.
`void` `writeDoubleNull()` If attribute is set to null in Struct, we need to send null indicator to the server since the parameter maps to double we send 8 bytes value to the server to insert null.
`void` `writeFloat(float f)` Writes the float from the collection to the server.
`void` `writeInt(int x)` Write the next attribute to the stream as a Java int.
`void` `writeInterval(Interval x)` Write the next attribute to the stream as an Informix Interval
`void` `writeLong(long l)` Writes the long value from the collection to the server.
`void` `writeLongBigint(long l, int type)` Writes the long value from the collection to the server.
`void` `writeNClob(java.sql.NClob x)`
`void` `writeNString(java.lang.String x)`
`void` `writeObject(java.lang.Object x)` This is an Informix extension to SQLOutput which allows java.util.Collection, IntervalDF and IntervalYM objects to be written.
`void` `writeObject(java.sql.SQLData x)` Write to the stream the data contained in the given object.
`void` `writeRef(java.sql.Ref x)` Write a REF(<structured-type>) to the stream.
`void` `writeRowId(java.sql.RowId x)`
`void` `writeShort(short s)` Writes the short value from the collection to the server.
`void` `writeSQLXML(java.sql.SQLXML x)`
`void` `writeString(java.lang.String x)` Write the next attribute to the stream as a Java String.
`void` `writeStruct(java.sql.Struct s)` Write a structured-type to the stream.
`void` `writeTime(java.sql.Time t)` Writes the time from the collection to the server.
`void` `writeTimestamp(java.sql.Timestamp ts)` Writes the timestamp from the collection to the server.
`void` `writeURL(java.net.URL x)`

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

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

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

`writeAsciiStream, writeBytes, writeCharacterStream, writeRef`

### Field Detail

#### conn

    protected IfxConnection conn

#### trace

    protected Trace trace

### Method Detail

#### writeInt

    public void writeInt(int x)
                  throws java.sql.SQLException

Write the next attribute to the stream as a Java int.

Specified by:
  `writeInt` in interface `java.sql.SQLOutput`
Parameters:
  `x` - the value to pass to the database.
Throws:
  `java.sql.SQLException`

#### writeString

    public void writeString(java.lang.String x)
                     throws java.sql.SQLException

Write the next attribute to the stream as a Java String.

Specified by:
  `writeString` in interface `java.sql.SQLOutput`
Parameters:
  `x` - the value to pass to the database.
Throws:
  `java.sql.SQLException`

#### writeObject

    public void writeObject(java.sql.SQLData x)
                     throws java.sql.SQLException

Write to the stream the data contained in the given object. When @x is null, the method writes an SQL NULL to the stream. Otherwise, it calls the SQLData.writeSQL method of the @x, which writes to the stream using the protocol described for SQLData.writeSQL.

Specified by:
  `writeObject` in interface `java.sql.SQLOutput`
Parameters:
  `x` - the object representing data of an SQL structured or distinct type
Throws:
  `java.sql.SQLException`

#### writeObject

    public void writeObject(java.lang.Object x)
                     throws java.sql.SQLException

This is an Informix extension to SQLOutput which allows java.util.Collection, IntervalDF and IntervalYM objects to be written.

Specified by:
  `writeObject` in interface `IfmxComplexSQLOutput`
Parameters:
  `x` - Object to be written
Throws:
  `java.sql.SQLException`

#### writeStruct

    public void writeStruct(java.sql.Struct s)
                     throws java.sql.SQLException

Write a structured-type to the stream.

Specified by:
  `writeStruct` in interface `java.sql.SQLOutput`
Parameters:
  `s` - an object representing data of a Structured Type
Throws:
  `java.sql.SQLException`

#### writeArray

    public void writeArray(java.sql.Array arr)
                    throws java.sql.SQLException

Write an array to the stream.

Specified by:
  `writeArray` in interface `java.sql.SQLOutput`
Parameters:
  `arr` - an object representing an SQL array
Throws:
  `java.sql.SQLException`

#### writeBigDecimal

    public void writeBigDecimal(java.math.BigDecimal bd)
                         throws java.sql.SQLException

Write a BigDecimal from the collection to the server. Also, update type since we're writing it as a decimal.

Specified by:
  `writeBigDecimal` in interface `java.sql.SQLOutput`
Parameters:
  `bd` - - The BigDecimal value to write
Throws:
  `java.sql.SQLException`

#### writeBinaryStream

    public void writeBinaryStream(java.io.InputStream is)
                           throws java.sql.SQLException

Write the InputStream from the collection to the server.

Specified by:
  `writeBinaryStream` in interface `java.sql.SQLOutput`
Parameters:
  `is` - - The InputStream to write
Throws:
  `java.sql.SQLException`

#### writeBlob

    public void writeBlob(java.sql.Blob blob)
                   throws java.sql.SQLException

Writes the Blob object from the collection to the server. Also sets type info.

Specified by:
  `writeBlob` in interface `java.sql.SQLOutput`
Parameters:
  `blob` - - The Blob object to be written
Throws:
  `java.sql.SQLException`

#### writeBoolean

    public void writeBoolean(boolean bool)
                      throws java.sql.SQLException

Writes the boolean from the collection to the server.

Specified by:
  `writeBoolean` in interface `java.sql.SQLOutput`
Parameters:
  `bool` - - The boolean value to be written
Throws:
  `java.sql.SQLException`

#### writeByte

    public void writeByte(byte b)
                   throws java.sql.SQLException

Writes the byte from the collection to the server.

Specified by:
  `writeByte` in interface `java.sql.SQLOutput`
Parameters:
  `b` - - The byte value to be written
Throws:
  `java.sql.SQLException`

#### writeClob

    public void writeClob(java.sql.Clob clob)
                   throws java.sql.SQLException

Writes the Clob object from the collection to the server.

Specified by:
  `writeClob` in interface `java.sql.SQLOutput`
Parameters:
  `clob` - - The Clob object to be written
Throws:
  `java.sql.SQLException`

#### writeDate

    public void writeDate(java.sql.Date d)
                   throws java.sql.SQLException

Writes the Date from the collection to the server.

Specified by:
  `writeDate` in interface `java.sql.SQLOutput`
Parameters:
  `d` - - The Date object to be written
Throws:
  `java.sql.SQLException`

#### writeDoubleNull

    public void writeDoubleNull()
                         throws java.sql.SQLException

If attribute is set to null in Struct, we need to send null indicator to the server since the parameter maps to double we send 8 bytes value to the server to insert null.

Throws:
  `java.sql.SQLException`

#### writeDouble

    public void writeDouble(double d)
                     throws java.sql.SQLException

Writes the double from the collection to the server.

Specified by:
  `writeDouble` in interface `java.sql.SQLOutput`
Parameters:
  `d` - - The double value to be written
Throws:
  `java.sql.SQLException`

#### writeFloat

    public void writeFloat(float f)
                    throws java.sql.SQLException

Writes the float from the collection to the server.

Specified by:
  `writeFloat` in interface `java.sql.SQLOutput`
Parameters:
  `f` - - The float value to be written
Throws:
  `java.sql.SQLException`

#### writeLong

    public void writeLong(long l)
                   throws java.sql.SQLException

Writes the long value from the collection to the server.

Specified by:
  `writeLong` in interface `java.sql.SQLOutput`
Parameters:
  `l` - - The long value to be written
Throws:
  `java.sql.SQLException`

#### writeShort

    public void writeShort(short s)
                    throws java.sql.SQLException

Writes the short value from the collection to the server.

Specified by:
  `writeShort` in interface `java.sql.SQLOutput`
Parameters:
  `s` - - The short value to be written
Throws:
  `java.sql.SQLException`

#### writeTime

    public void writeTime(java.sql.Time t)
                   throws java.sql.SQLException

Writes the time from the collection to the server.

Specified by:
  `writeTime` in interface `java.sql.SQLOutput`
Parameters:
  `t` - - The Time object to be written
Throws:
  `java.sql.SQLException`

#### writeTimestamp

    public void writeTimestamp(java.sql.Timestamp ts)
                        throws java.sql.SQLException

Writes the timestamp from the collection to the server.

Specified by:
  `writeTimestamp` in interface `java.sql.SQLOutput`
Parameters:
  `ts` - - The Timestamp object to be written
Throws:
  `java.sql.SQLException`

#### writeInterval

    public void writeInterval(Interval x)
                       throws java.sql.SQLException

Write the next attribute to the stream as an Informix Interval

Specified by:
  `writeInterval` in interface `IfmxComplexSQLOutput`
Parameters:
  `x` - the value to pass to the database
Throws:
  `java.sql.SQLException`
See Also:
  `Interval`, `IntervalYM`, `IntervalDF`

#### getExtendedName

    protected java.lang.String getExtendedName()
                                        throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### getUDToffset

    public static int getUDToffset(int dataStart,
                   Trace trace)

#### writeURL

    public void writeURL(java.net.URL x)
                  throws java.sql.SQLException

Specified by:
  `writeURL` in interface `java.sql.SQLOutput`
Throws:
  `java.sql.SQLException`

#### writeLongBigint

    public void writeLongBigint(long l,
                       int type)
                         throws java.sql.SQLException

Writes the long value from the collection to the server.

Parameters:
  `l` - - The long value to be written
Throws:
  `java.sql.SQLException`

#### writeNClob

    public void writeNClob(java.sql.NClob x)
                    throws java.sql.SQLException

Specified by:
  `writeNClob` in interface `java.sql.SQLOutput`
Throws:
  `java.sql.SQLException`

#### writeNString

    public void writeNString(java.lang.String x)
                      throws java.sql.SQLException

Specified by:
  `writeNString` in interface `java.sql.SQLOutput`
Throws:
  `java.sql.SQLException`

#### writeRowId

    public void writeRowId(java.sql.RowId x)
                    throws java.sql.SQLException

Specified by:
  `writeRowId` in interface `java.sql.SQLOutput`
Throws:
  `java.sql.SQLException`

#### writeSQLXML

    public void writeSQLXML(java.sql.SQLXML x)
                     throws java.sql.SQLException

Specified by:
  `writeSQLXML` in interface `java.sql.SQLOutput`
Throws:
  `java.sql.SQLException`

#### toByteArray

    public byte[] toByteArray()

#### writeBytes

    public void writeBytes(byte[] x)
                    throws java.sql.SQLException

Write the next attribute to the stream as an array of bytes.

Specified by:
  `writeBytes` in interface `java.sql.SQLOutput`
Parameters:
  `x` - the value to pass to the database.
Throws:
  `java.sql.SQLException`

#### writeBytes

    public void writeBytes(byte[] x,
                  int len)
                    throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### writeCharacterStream

    public void writeCharacterStream(java.io.Reader x)
                              throws java.sql.SQLException

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

Specified by:
  `writeCharacterStream` in interface `java.sql.SQLOutput`
Parameters:
  `x` - the value to pass to the database.
Throws:
  `java.sql.SQLException`

#### writeAsciiStream

    public void writeAsciiStream(java.io.InputStream x)
                          throws java.sql.SQLException

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

Specified by:
  `writeAsciiStream` in interface `java.sql.SQLOutput`
Parameters:
  `x` - the value to pass to the database.
Throws:
  `java.sql.SQLException`

#### writeRef

    public void writeRef(java.sql.Ref x)
                  throws java.sql.SQLException

Write a REF(<structured-type>) to the stream.

Specified by:
  `writeRef` in interface `java.sql.SQLOutput`
Parameters:
  `x` - an object representing data of an SQL REF Type
Throws:
  `java.sql.SQLException`