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()
SQLUDTInput
Get the total length of the entire data stream.
length
in interface IfmxUDTSQLInput
length
in interface SQLUDTInput
public java.lang.String readString() throws java.sql.SQLException
readString
in interface java.sql.SQLInput
java.sql.SQLException
public byte readByte() throws java.sql.SQLException
readByte
in interface java.sql.SQLInput
java.sql.SQLException
public short readShort() throws java.sql.SQLException
readShort
in interface java.sql.SQLInput
java.sql.SQLException
public int readInt() throws java.sql.SQLException
readInt
in interface java.sql.SQLInput
java.sql.SQLException
public java.lang.String readString(int len) throws java.sql.SQLException
readString
in interface IfmxUDTSQLInput
readString
in interface SQLUDTInput
len
- the maximum size of data to read in.java.sql.SQLException
public java.lang.String readString(int len, java.lang.String dbEnc) throws java.sql.SQLException
java.sql.SQLException
public boolean readBoolean() throws java.sql.SQLException
readBoolean
in interface java.sql.SQLInput
java.sql.SQLException
public long readLong() throws java.sql.SQLException
readLong
in interface java.sql.SQLInput
java.sql.SQLException
public long readLongBigint() throws java.sql.SQLException
java.sql.SQLException
public float readFloat() throws java.sql.SQLException
readFloat
in interface java.sql.SQLInput
java.sql.SQLException
public double readDouble() throws java.sql.SQLException
readDouble
in interface java.sql.SQLInput
java.sql.SQLException
public java.math.BigDecimal readBigDecimal() throws java.sql.SQLException
readBigDecimal
in interface java.sql.SQLInput
java.sql.SQLException
public byte[] readBytes() throws java.sql.SQLException
readBytes
in interface java.sql.SQLInput
java.sql.SQLException
public byte[] readBytes(int len) throws java.sql.SQLException
readBytes
in interface IfmxUDTSQLInput
readBytes
in interface SQLUDTInput
len
- the maximum size of data to read in.java.sql.SQLException
public java.sql.Date readDate() throws java.sql.SQLException
readDate
in interface java.sql.SQLInput
java.sql.SQLException
public java.sql.Timestamp readTimestamp() throws java.sql.SQLException
readTimestamp
in interface java.sql.SQLInput
java.sql.SQLException
public java.io.Reader readCharacterStream() throws java.sql.SQLException
readCharacterStream
in interface java.sql.SQLInput
java.sql.SQLException
public java.io.InputStream readAsciiStream() throws java.sql.SQLException
readAsciiStream
in interface java.sql.SQLInput
java.sql.SQLException
public java.io.InputStream readBinaryStream() throws java.sql.SQLException
readBinaryStream
in interface java.sql.SQLInput
java.sql.SQLException
public java.lang.Object readObject() throws java.sql.SQLException
readObject
in interface java.sql.SQLInput
java.sql.SQLException
public java.sql.Ref readRef() throws java.sql.SQLException
readRef
in interface java.sql.SQLInput
java.sql.SQLException
public java.sql.Blob readBlob() throws java.sql.SQLException
readBlob
in interface java.sql.SQLInput
java.sql.SQLException
public java.sql.Clob readClob() throws java.sql.SQLException
readClob
in interface java.sql.SQLInput
java.sql.SQLException
public java.sql.Array readArray() throws java.sql.SQLException
readArray
in interface java.sql.SQLInput
java.sql.SQLException
public Interval readInterval() throws java.sql.SQLException
readInterval
in interface IfmxUDTSQLInput
readInterval
in interface SQLUDTInput
java.sql.SQLException
public void setAutoAlignment(boolean value)
setAutoAlignment
in interface IfmxUDTSQLInput
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.public boolean getAutoAlignment()
getAutoAlignment
in interface IfmxUDTSQLInput
public void skipBytes(int len) throws java.sql.SQLException
skipBytes
in interface IfmxUDTSQLInput
len
- Number of bytes to skip over and discard.java.sql.SQLException
public int getCurrentPosition()
getCurrentPosition
in interface IfmxUDTSQLInput
public void setCurrentPosition(int position) throws java.sql.SQLException
setCurrentPosition
in interface IfmxUDTSQLInput
- java.sql.SQLException
public int available()
available
in interface IfmxUDTSQLInput
public IfxUDTInfo getUDTInfo(int xid) throws java.sql.SQLException
getUDTInfo
in interface IfmxUDTSQLInput
xid
- Is the extended id found in sysxtdtype system catalog.java.sql.SQLException
public IfxUDTInfo getUDTInfo(java.lang.String name, java.lang.String owner) throws java.sql.SQLException
getUDTInfo
in interface IfmxUDTSQLInput
name
- The data type name.owner
- The owner of the data type (can be null).java.sql.SQLException
public java.net.URL readURL() throws java.sql.SQLException
readURL
in interface java.sql.SQLInput
java.sql.SQLException
public java.sql.NClob readNClob() throws java.sql.SQLException
readNClob
in interface java.sql.SQLInput
java.sql.SQLException
public java.lang.String readNString() throws java.sql.SQLException
readNString
in interface java.sql.SQLInput
java.sql.SQLException
public java.sql.RowId readRowId() throws java.sql.SQLException
readRowId
in interface java.sql.SQLInput
java.sql.SQLException
public java.sql.SQLXML readSQLXML() throws java.sql.SQLException
readSQLXML
in interface java.sql.SQLInput
java.sql.SQLException
protected int currentPosition()
protected void reset()
protected void checkLength(int len) throws java.sql.SQLException
java.sql.SQLException
public java.sql.Time readTime() throws java.sql.SQLException
readTime
in interface java.sql.SQLInput
java.sql.SQLException
public boolean wasNull()
wasNull
in interface java.sql.SQLInput