public class IfxUDTOutput extends java.lang.Object implements SQLUDTOutput, IfmxUDTSQLOutput
| Modifier and Type | Field and Description |
|---|---|
protected IfxConnection |
conn |
protected Trace |
trace |
| Modifier and Type | Method and Description |
|---|---|
int |
available()
Returns the number of valid bytes remaining in this output 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 output 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 written to the data stream.
|
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 output stream.
|
byte[] |
toByteArray() |
void |
writeArray(java.sql.Array x)
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 x)
Write the next attribute to the stream as a java.math.BigDecimal object.
|
void |
writeBinaryStream(java.io.InputStream x)
Return the next attribute to the stream as a stream of uninterpreted
bytes.
|
void |
writeBlob(java.sql.Blob x)
Write a BLOB to the stream.
|
void |
writeBoolean(boolean x)
Write the next attribute to the stream as a Java boolean.
|
void |
writeByte(byte x)
Write the next attribute to the stream as a Java byte.
|
void |
writeBytes(byte[] x)
Write the next attribute to the stream as an array of bytes.
|
void |
writeBytes(byte[] x,
int len)
Write the next attribute to the stream as a Java byte array.
|
void |
writeCharacterStream(java.io.Reader x)
Return the next attribute to the stream as a stream of Unicode characters.
|
void |
writeClob(java.sql.Clob x)
Write a CLOB to the stream.
|
void |
writeDate(java.sql.Date x)
Write the next attribute to the stream as a java.sql.Date object.
|
void |
writeDouble(double x)
Write the next attribute to the stream as a Java double.
|
void |
writeFloat(float x)
Write the next attribute to the stream as a Java float.
|
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 a Interval object
(IntervalYM or IntervalDF).
|
void |
writeLong(long x)
Write the next attribute to the stream as a Java long.
|
void |
writeLongBigint(long x) |
void |
writeNClob(java.sql.NClob x) |
void |
writeNString(java.lang.String x) |
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 x)
Write the next attribute to the stream as a Java short.
|
void |
writeSQLXML(java.sql.SQLXML x) |
void |
writeString(java.lang.String x)
Write the next attribute to the stream as a Java String.
|
void |
writeString(java.lang.String x,
int len)
Write the next attribute to the stream as a Java String.
|
void |
writeString(java.lang.String x,
java.lang.String dbEnc)
Write the string to the stream with dbencoding.
|
void |
writeStruct(java.sql.Struct x)
Write a structured-type to the stream.
|
void |
writeTime(java.sql.Time x)
Write the next attribute to the stream as a java.sql.Time object.
|
void |
writeTimestamp(java.sql.Timestamp x)
Write the next attribute to the stream as a java.sql.Timestamp object.
|
void |
writeURL(java.net.URL x) |
protected IfxConnection conn
protected Trace trace
public void writeString(java.lang.String x,
int len)
throws java.sql.SQLException
writeString in interface IfmxUDTSQLOutputwriteString in interface SQLUDTOutputx - the value to pass to the database.len - the length of the destinated fieldjava.sql.SQLExceptionpublic void writeString(java.lang.String x,
java.lang.String dbEnc)
throws java.sql.SQLException
x - the value to write to the streamdbenc - is the database encodingjava.sql.SQLExceptionpublic void writeByte(byte x)
throws java.sql.SQLException
writeByte in interface java.sql.SQLOutputx - the value to pass to the database.java.sql.SQLExceptionpublic void writeBoolean(boolean x)
throws java.sql.SQLException
writeBoolean in interface java.sql.SQLOutputx - the value to pass to the database.java.sql.SQLExceptionpublic void writeShort(short x)
throws java.sql.SQLException
writeShort in interface java.sql.SQLOutputx - the value to pass to the database.java.sql.SQLExceptionpublic void writeInt(int x)
throws java.sql.SQLException
writeInt in interface java.sql.SQLOutputx - the value to pass to the database.java.sql.SQLExceptionpublic void writeLong(long x)
throws java.sql.SQLException
writeLong in interface java.sql.SQLOutputx - the value to pass to the database.java.sql.SQLExceptionpublic void writeLongBigint(long x)
throws java.sql.SQLException
java.sql.SQLExceptionpublic void writeFloat(float x)
throws java.sql.SQLException
writeFloat in interface java.sql.SQLOutputx - the value to pass to the database.java.sql.SQLExceptionpublic void writeDouble(double x)
throws java.sql.SQLException
writeDouble in interface java.sql.SQLOutputx - the value to pass to the database.java.sql.SQLExceptionpublic void writeBigDecimal(java.math.BigDecimal x)
throws java.sql.SQLException
writeBigDecimal in interface java.sql.SQLOutputx - the value to pass to the database.java.sql.SQLExceptionpublic void writeBytes(byte[] x,
int len)
throws java.sql.SQLException
SQLUDTOutputwriteBytes in interface IfmxUDTSQLOutputwriteBytes in interface SQLUDTOutputx - The value to be passed to the database.len - the length of the destinated fieldjava.sql.SQLExceptionpublic void writeTimestamp(java.sql.Timestamp x)
throws java.sql.SQLException
writeTimestamp in interface java.sql.SQLOutputx - the value to pass to the database.java.sql.SQLExceptionpublic void writeCharacterStream(java.io.Reader x)
throws java.sql.SQLException
writeCharacterStream in interface java.sql.SQLOutputx - the value to pass to the database.java.sql.SQLExceptionpublic void writeAsciiStream(java.io.InputStream x)
throws java.sql.SQLException
writeAsciiStream in interface java.sql.SQLOutputx - the value to pass to the database.java.sql.SQLExceptionpublic void writeBinaryStream(java.io.InputStream x)
throws java.sql.SQLException
writeBinaryStream in interface java.sql.SQLOutputx - the value to pass to the database.java.sql.SQLExceptionpublic void writeObject(java.sql.SQLData x)
throws java.sql.SQLException
writeObject in interface java.sql.SQLOutputx - the object representing data of an SQL structured or
distinct typejava.sql.SQLExceptionpublic void writeRef(java.sql.Ref x)
throws java.sql.SQLException
writeRef in interface java.sql.SQLOutputx - an object representing data of an SQL REF Typejava.sql.SQLExceptionpublic void writeBlob(java.sql.Blob x)
throws java.sql.SQLException
writeBlob in interface java.sql.SQLOutputx - an object representing a BLOBjava.sql.SQLExceptionpublic void writeClob(java.sql.Clob x)
throws java.sql.SQLException
writeClob in interface java.sql.SQLOutputx - an object representing a CLOBjava.sql.SQLExceptionpublic void writeStruct(java.sql.Struct x)
throws java.sql.SQLException
writeStruct in interface java.sql.SQLOutputx - an object representing data of a Structured Typejava.sql.SQLExceptionpublic void writeArray(java.sql.Array x)
throws java.sql.SQLException
writeArray in interface java.sql.SQLOutputx - an object representing an SQL arrayjava.sql.SQLExceptionpublic void writeInterval(Interval x) throws java.sql.SQLException
writeInterval in interface IfmxUDTSQLOutputwriteInterval in interface SQLUDTOutputx - the interval to pass to the database.java.sql.SQLExceptionpublic int length()
IfmxUDTSQLOutputGets the total length written to the data stream.
length in interface IfmxUDTSQLOutputpublic void setAutoAlignment(boolean value)
setAutoAlignment in interface IfmxUDTSQLOutputvalue - = 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 IfmxUDTSQLOutputpublic void skipBytes(int len)
throws java.sql.SQLException
skipBytes in interface IfmxUDTSQLOutputlen - Number of bytes to skip over and discard.java.sql.SQLExceptionpublic int getCurrentPosition()
getCurrentPosition in interface IfmxUDTSQLOutputpublic void setCurrentPosition(int position)
throws java.sql.SQLException
setCurrentPosition in interface IfmxUDTSQLOutputposition - java.sql.SQLExceptionpublic int available()
available in interface IfmxUDTSQLOutputpublic IfxUDTInfo getUDTInfo(int xid) throws java.sql.SQLException
getUDTInfo in interface IfmxUDTSQLOutputxid - 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 IfmxUDTSQLOutputname - The data type name.owner - The owner of the data type (can be null).java.sql.SQLExceptionpublic void writeURL(java.net.URL x)
throws java.sql.SQLException
writeURL in interface java.sql.SQLOutputjava.sql.SQLExceptionpublic void writeNClob(java.sql.NClob x)
throws java.sql.SQLException
writeNClob in interface java.sql.SQLOutputjava.sql.SQLExceptionpublic void writeNString(java.lang.String x)
throws java.sql.SQLException
writeNString in interface java.sql.SQLOutputjava.sql.SQLExceptionpublic void writeRowId(java.sql.RowId x)
throws java.sql.SQLException
writeRowId in interface java.sql.SQLOutputjava.sql.SQLExceptionpublic void writeSQLXML(java.sql.SQLXML x)
throws java.sql.SQLException
writeSQLXML in interface java.sql.SQLOutputjava.sql.SQLExceptionpublic byte[] toByteArray()
public void writeString(java.lang.String x)
throws java.sql.SQLException
writeString in interface java.sql.SQLOutputx - the value to pass to the database.java.sql.SQLExceptionpublic void writeBytes(byte[] x)
throws java.sql.SQLException
writeBytes in interface java.sql.SQLOutputx - the value to pass to the database.java.sql.SQLExceptionpublic void writeDate(java.sql.Date x)
throws java.sql.SQLException
writeDate in interface java.sql.SQLOutputx - the value to pass to the database.java.sql.SQLExceptionpublic void writeTime(java.sql.Time x)
throws java.sql.SQLException
writeTime in interface java.sql.SQLOutputx - the value to pass to the database.java.sql.SQLException