public class IfxDataOutputStream
extends java.io.FilterOutputStream
| Modifier and Type | Field and Description |
|---|---|
protected int |
written
The number of bytes written to the outputstream.
Make sure that variable byteCountAtEOT remains of same type as that of written |
| Constructor and Description |
|---|
IfxDataOutputStream(java.io.OutputStream s)
Constructs an IfxDataOutputStream
|
IfxDataOutputStream(java.io.OutputStream s,
boolean encoption) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
clearTrace() |
void |
flush()
flushes the outputstream.
|
int |
getBytesSentSinceLastEOT() |
byte[] |
getJavaToIfx4BytesChar(java.lang.String s)
returns a byte array of the given string, conversion routine should be
used for servers that have removed 64K Limit, default db local will be
used for encoding.
|
byte[] |
getJavaToIfx4BytesChar(java.lang.String s,
java.lang.String dbenc)
returns a byte array of the given string, conversion routine should be
used for servers that have removed 64K Limit, conversion is done based on
given dbencoding option.
|
byte[] |
getJavaToIfxChar(java.lang.String s)
Returns a byte array after converting given string using default
encoding.
|
byte[] |
getJavaToIfxChar(java.lang.String s,
java.lang.String dbEnc)
Returns a byte array after converting given string using db encoding
given.
|
void |
setByteCntAtEOT()
This is to be called after SQ_EOT is sent every time .
|
void |
write(byte[] b)
writes a byte array to the outputstream.
|
void |
write(byte[] b,
int offset,
int length)
writes a byte array to the outputstream.
|
void |
write(int i)
writes a byte to the outputstream.
|
void |
writeByte(int i)
writes a byte to the outputstream.
|
void |
writeBytes(byte[] b)
Writes the given sequence of bytes to the outputstream
|
void |
writeBytesConstant(java.lang.String s)
Strictly to be used by constants that are guaranteed not to throw any
UnsupportedEncodingException, for all variables please use
writeBytes(byte) method by doing the conversion upfront.
|
void |
writeChar(byte[] b) |
void |
writeDate(java.sql.Date d)
Converts a java date to an Informix date and writes it to the stream
|
void |
writeDateTime(java.sql.Timestamp t)
Converts a java datetime to an Informix datetime and writes it to the
stream
|
void |
writeDecimal(java.math.BigDecimal n)
Converts a java numeric to an Informix decimal and writes it to the
stream.
|
void |
writeDouble(double d)
Converts a java double to an Informix double precision and writes it to
the stream.
|
void |
writeInt(int i)
converts an integer to an Informix int and writes it to the outputstream.
|
void |
writeInterval(IntervalDF i)
Converts a java interval to an Informix interval and writes it to the
stream
|
void |
writeInterval(IntervalYM i)
Converts a java interval to an Informix interval and writes it to the
stream
|
void |
writeLong(long s)
Converts a java long to an Informix int8 and writes it to the stream.
|
void |
writeLongBigint(long s)
Converts a java long to an Informix int8 and writes it to the stream.
|
void |
writeLongInt(long s)
Converts a java long to an Informix int8 and writes it to the stream.
|
void |
writePadded(byte[] b)
writes a byte array to the outputstream.
|
void |
writePadded(byte[] b,
int offset,
int length)
writes a byte array to the outputstream.
|
void |
writeReal(float f)
Converts a java real to an Informix real and writes it to the stream.
|
void |
writeShort(int i)
Converts a java short to an Informix smallint and writes it to the
stream.
|
void |
writeShort(short s) |
void |
writeSmallInt(short s)
Converts a java short to an Informix smallint and writes it to the
stream.
|
void |
writeWithMangledTrace(byte[] b)
In this class , the implementation is same as Same as write (byte b [])
method.
|
void |
writeWithoutTrace(byte[] b,
int offset,
int length) |
protected int written
public IfxDataOutputStream(java.io.OutputStream s)
public IfxDataOutputStream(java.io.OutputStream s,
boolean encoption)
public void write(int i)
throws java.io.IOException
write in class java.io.FilterOutputStreami - the byte to write to the outputstream.java.io.IOException - In case an I/O error occurs.public void write(byte[] b,
int offset,
int length)
throws java.io.IOException
write in class java.io.FilterOutputStreamb - the byte array to write to the outputstream.offset - the offset of the data.length - the maximum number of bytes to write to the outputstream.java.io.IOException - In case an I/O error occurs.public void writeWithoutTrace(byte[] b,
int offset,
int length)
throws java.io.IOException
java.io.IOExceptionpublic void writePadded(byte[] b,
int offset,
int length)
throws java.io.IOException
b - the byte array to write to the outputstream.offset - the offset of the data.length - the maximum number of bytes to write to the outputstream.java.io.IOException - In case an I/O error occurs.public void write(byte[] b)
throws java.io.IOException
write in class java.io.FilterOutputStreamb - the byte array to write to the outputstream.java.io.IOException - In case an I/O error occurs.public void writeWithMangledTrace(byte[] b)
throws java.io.IOException
b - java.io.IOExceptionpublic void writePadded(byte[] b)
throws java.io.IOException
b - the byte array to write to the outputstream.java.io.IOException - In case an I/O error occurs.public void writeInt(int i)
throws java.io.IOException
i - the java integer to write to the stream.java.io.IOException - In case an I/O error occurs.public void flush()
throws java.io.IOException
flush in interface java.io.Flushableflush in class java.io.FilterOutputStreamjava.io.IOException - In case an I/O error occurs.public void writeByte(int i)
throws java.io.IOException
i - byte to write to the stream.java.io.IOException - In case an I/O error occurs.public void writeBytes(byte[] b)
throws java.io.IOException
b - byte to write to the stream.java.io.IOException - In case an I/O error occurs.public void writeBytesConstant(java.lang.String s)
throws java.io.IOException,
java.sql.SQLException
s - java.io.IOExceptionjava.sql.SQLExceptionpublic byte[] getJavaToIfxChar(java.lang.String s,
java.lang.String dbEnc)
throws java.io.IOException,
java.sql.SQLException
s - dbEnc - java.io.IOExceptionjava.sql.SQLExceptionpublic byte[] getJavaToIfxChar(java.lang.String s)
throws java.io.IOException,
java.sql.SQLException
s - java.io.IOExceptionjava.sql.SQLExceptionpublic byte[] getJavaToIfx4BytesChar(java.lang.String s)
throws java.io.IOException,
java.sql.SQLException
s - java.io.IOExceptionjava.sql.SQLExceptionpublic byte[] getJavaToIfx4BytesChar(java.lang.String s,
java.lang.String dbenc)
throws java.io.IOException,
java.sql.SQLException
s - String to convertdbenc - db locale encoding to use.java.io.IOExceptionjava.sql.SQLExceptionpublic void writeChar(byte[] b)
throws java.io.IOException
java.io.IOExceptionpublic void writeDate(java.sql.Date d)
throws java.io.IOException
d - the java.sql.Date to write to the stream.java.io.IOException - In case an I/O error occurs.public void writeDateTime(java.sql.Timestamp t)
throws java.io.IOException
t - the java.sql.Timestamp to write to the stream.java.io.IOException - In case an I/O error occurs.public void writeInterval(IntervalDF i) throws java.io.IOException
t - the IntervalDF to write to the stream.java.io.IOException - In case an I/O error occurs.public void writeInterval(IntervalYM i) throws java.io.IOException
t - the IntervalYM to write to the stream.java.io.IOException - In case an I/O error occurs.public void writeDecimal(java.math.BigDecimal n)
throws java.io.IOException
n - the java.lang.Bignum to write to the stream.java.io.IOException - In case an I/O error occurs.public void writeDouble(double d)
throws java.io.IOException
d - the java double to write to the stream.java.io.IOException - In case an I/O error occurs.public void writeReal(float f)
throws java.io.IOException
f - the java float to write to the stream.java.io.IOException - In case an I/O error occurs.public void writeSmallInt(short s)
throws java.io.IOException
s - the java short to write to the stream.java.io.IOException - In case an I/O error occurs.public void writeShort(int i)
throws java.io.IOException
s - the java short to write to the stream.java.io.IOException - In case an I/O error occurs.public void writeShort(short s)
throws java.io.IOException
java.io.IOExceptionpublic void writeLongInt(long s)
throws java.io.IOException
s - the java long to write to the stream.java.io.IOException - In case an I/O error occurs.public void writeLongBigint(long s)
throws java.io.IOException
s - the java long to write to the stream.java.io.IOException - In case an I/O error occurs.public void writeLong(long s)
throws java.io.IOException
s - the java long to write to the stream.java.io.IOException - In case an I/O error occurs.public void setByteCntAtEOT()
public int getBytesSentSinceLastEOT()
protected void clearTrace()