com.ibm.mq.data
Class MQDataOutputStream
- java.lang.Object
java.io.OutputStream
java.io.FilterOutputStream
com.ibm.mq.data.MQDataOutputStream
All implemented interfaces:
MQDataOutput, java.io.Closeable, java.io.Flushable
- public class MQDataOutputStream
- extends java.io.FilterOutputStream
- implements MQDataOutput
Field Summary
Modifier and Type | Field and Description |
---|---|
|
COPYRIGHT
|
Fields inherited from class java.io.FilterOutputStream |
---|
out |
Constructor Summary
Constructor and Description |
---|
MQDataOutputStream(java.io.OutputStream out)
|
Method Summary
Modifier and Type | Method and Description |
---|---|
|
getCCSID()
|
|
getDataOffset()
|
getDecimalEncoding()
|
|
|
getEncoding()
|
getFloatEncoding()
|
|
getIntegerEncoding()
|
|
|
setCCSID(int ccsid)
|
|
setDecimalEncoding(DecimalEncoding de)
|
|
setEncoding(int encoding)
|
|
setFloatEncoding(FloatEncoding fe)
|
|
setIntegerEncoding(IntegerEncoding ie)
|
|
write(byte[] b)
|
|
write(byte[] b,int off,int len)
|
|
write(int b)
|
|
writeByte(byte b)
|
|
writeBytes(byte[] b)
|
|
writeBytes(byte[] b,int off,int len,byte pad)
|
|
writeDecimal(int fieldLen,java.math.BigInteger bi)
|
|
writeDecimal2(short s)
|
|
writeDecimal4(int i)
|
|
writeDecimal8(long l)
|
|
writeDouble(double d)
|
|
writeFloat(float f)
|
|
writeInt(int i)
|
|
writeLong(long l)
|
|
writeMQBYTE(byte b)
|
|
writeMQBYTE(byte[] b)
|
|
writeMQBYTE(int fieldLen,byte[] b)
|
|
writeMQBYTE(int fieldLen,byte[] b,byte pad)
|
|
writeMQBYTE(int fieldLen,byte[] b,int off)
|
|
writeMQBYTE(int fieldLen,byte[] b,int off,byte pad)
|
|
writeMQBYTE16(byte[] b)
|
|
writeMQBYTE16(byte[] b,int off)
|
|
writeMQBYTE24(byte[] b)
|
|
writeMQBYTE24(byte[] b,int off)
|
|
writeMQBYTE32(byte[] b)
|
|
writeMQBYTE32(byte[] b,int off)
|
|
writeMQBYTE8(byte[] b)
|
|
writeMQBYTE8(byte[] b,int off)
|
|
writeMQCHAR(char c)
|
|
writeMQCHAR(char[] c)
|
|
writeMQCHAR(int fieldLen,char[] c)
|
|
writeMQCHAR(int fieldLen,char[] c,char pad)
|
|
writeMQCHAR(int fieldLen,char[] c,int off)
|
|
writeMQCHAR(int fieldLen,char[] c,int off,char pad)
|
|
writeMQCHAR(int fieldLen,java.lang.String s)
|
|
writeMQCHAR(int fieldLen,java.lang.String s,char pad)
|
|
writeMQCHAR(java.lang.String s)
|
|
writeMQCHAR12(char[] c)
|
|
writeMQCHAR12(char[] c,int off)
|
|
writeMQCHAR12(java.lang.String s)
|
|
writeMQCHAR128(char[] c)
|
|
writeMQCHAR128(char[] c,int off)
|
|
writeMQCHAR128(java.lang.String s)
|
|
writeMQCHAR16(char[] c)
|
|
writeMQCHAR16(char[] c,int off)
|
|
writeMQCHAR16(java.lang.String s)
|
|
writeMQCHAR20(char[] c)
|
|
writeMQCHAR20(char[] c,int off)
|
|
writeMQCHAR20(java.lang.String s)
|
|
writeMQCHAR24(char[] c)
|
|
writeMQCHAR24(char[] c,int off)
|
|
writeMQCHAR24(java.lang.String s)
|
|
writeMQCHAR256(char[] c)
|
|
writeMQCHAR256(char[] c,int off)
|
|
writeMQCHAR256(java.lang.String s)
|
|
writeMQCHAR28(char[] c)
|
|
writeMQCHAR28(char[] c,int off)
|
|
writeMQCHAR28(java.lang.String s)
|
|
writeMQCHAR32(char[] c)
|
|
writeMQCHAR32(char[] c,int off)
|
|
writeMQCHAR32(java.lang.String s)
|
|
writeMQCHAR4(char[] c)
|
|
writeMQCHAR4(char[] c,int off)
|
|
writeMQCHAR4(java.lang.String s)
|
|
writeMQCHAR48(char[] c)
|
|
writeMQCHAR48(char[] c,int off)
|
|
writeMQCHAR48(java.lang.String s)
|
|
writeMQCHAR64(char[] c)
|
|
writeMQCHAR64(char[] c,int off)
|
|
writeMQCHAR64(java.lang.String s)
|
|
writeMQCHAR8(char[] c)
|
|
writeMQCHAR8(char[] c,int off)
|
|
writeMQCHAR8(java.lang.String s)
|
|
writeMQINT32(int i)
|
|
writeMQINT64(long l)
|
|
writeMQLONG(int i)
|
|
writeMQSHORT(short s)
|
|
writeMQUINT32(long l)
|
|
writeMQUINT64(java.math.BigInteger i)
|
|
writeMQULONG(long l)
|
|
writeMQUSHORT(int i)
|
|
writeObject(java.lang.Object object)
|
|
writeShort(short s)
|
|
writeUCS2Char(char c)
|
|
writeUTF(java.lang.String s)
|
Methods inherited from class java.io.FilterOutputStream |
---|
close, flush |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail
COPYRIGHT
- public static final java.lang.String COPYRIGHT
See Also:
Constructor Detail
MQDataOutputStream
- public MQDataOutputStream(java.io.OutputStream out)
Method Detail
setCCSID
- public void setCCSID(int ccsid)
- throws java.io.IOException
Sets the Coded Character Set Identifier to be used for subsequent
character write operations.
Specified by:
setCCSID
in interface MQDataOutput
Parameters:
ccsid
- new CCSID value Throws:
java.io.IOException
getCCSID
- public int getCCSID()
- throws java.io.IOException
Description copied from interface:
MQDataOutput
Returns the Coded Character Set Identifier currently used for
character write operations
Specified by:
getCCSID
in interface MQDataOutput
Returns:
current CCSID value
Throws:
java.io.IOException
setIntegerEncoding
- public void setIntegerEncoding( IntegerEncoding ie)
- throws java.io.IOException
Description copied from interface:
MQDataOutput
Sets the IntegerEncoding to be uesd for subsequence integer write
operations. IntegerEncoding.UNDEFINED is treated as IntegerEncoding.NORMAL.
Specified by:
setIntegerEncoding
in interface MQDataOutput
getIntegerEncoding
- public IntegerEncoding getIntegerEncoding( )
- throws java.io.IOException
Description copied from interface:
MQDataOutput
Returns the IntegerEncoding currently used for integer write operations.
Specified by:
getIntegerEncoding
in interface MQDataOutput
setFloatEncoding
- public void setFloatEncoding(FloatEncoding fe)
- throws java.io.IOException
Description copied from interface:
MQDataOutput
Sets the FloatEncoding to be used for subsequent floating-point
write operations. FloatEncoding.UNDEFINED is treated as
FloatEncoding.IEEE_NORMAL.
Specified by:
setFloatEncoding
in interface MQDataOutput
Parameters:
fe
- new floating-point encoding value Throws:
java.io.IOException
See Also:
getFloatEncoding
- public FloatEncoding getFloatEncoding( )
- throws java.io.IOException
Description copied from interface:
MQDataOutput
Returns the FloatEncoding currently used for floating-point write operations.
Specified by:
getFloatEncoding
in interface MQDataOutput
setDecimalEncoding
- public void setDecimalEncoding( DecimalEncoding de)
- throws java.io.IOException
Description copied from interface:
MQDataOutput
Sets the DecimalEncoding to be used for subsequent packed-decimal
write operations. DecimalEncoding.UNDEFINED is treated as
DecimalEncoding.NORMAL
Specified by:
setDecimalEncoding
in interface MQDataOutput
Parameters:
de
- new packed-decimal encoding value Throws:
java.io.IOException
See Also:
getDecimalEncoding
- public DecimalEncoding getDecimalEncoding( )
- throws java.io.IOException
Description copied from interface:
MQDataOutput
Returns the DecimalEncoding currently used for packed-decimal write operations.
Specified by:
getDecimalEncoding
in interface MQDataOutput
setEncoding
- public void setEncoding(int encoding)
- throws java.io.IOException
Description copied from interface:
MQDataOutput
Sets all three encoding values - integer, floating-point and packed-decimal,
using the WMQ encoding identifier. These will be used for subsequent numeric
write operations.
Specified by:
setEncoding
in interface MQDataOutput
Parameters:
encoding
- integer representation of the new encoding Throws:
java.io.IOException
getEncoding
- public int getEncoding()
- throws java.io.IOException
Description copied from interface:
MQDataOutput
Return the WMQ encoding identifier representing the three encodings (integer,
floating-point and packed-decimal) currently used for numeric write operations.
Specified by:
getEncoding
in interface MQDataOutput
Returns:
integer representation of the current encoding
Throws:
java.io.IOException
getDataOffset
- public int getDataOffset()
- throws java.io.IOException
Description copied from interface:
MQDataOutput
Returns the current offset of the cursor, relative to the position where
this MQDataOutput object was originally created. Behaviour is undefined
if the underlying data source has been manipulated without going through
this MQDataOutput object.
Specified by:
getDataOffset
in interface MQDataOutput
Returns:
number of bytes read or skipped
Throws:
java.io.IOException
write
- public void write(int b)
- throws java.io.IOException
Overrides:
write
in class java.io.FilterOutputStream
Throws:
java.io.IOException
write
- public void write(byte[] b)
- throws java.io.IOException
Overrides:
write
in class java.io.FilterOutputStream
Throws:
java.io.IOException
write
- public void write(byte[] b,
- int off,
- int len)
- throws java.io.IOException
Overrides:
write
in class java.io.FilterOutputStream
Throws:
java.io.IOException
writeByte
- public void writeByte(byte b)
- throws java.io.IOException
Description copied from interface:
MQDataOutput
Writes a single (signed) byte
Specified by:
writeByte
in interface MQDataOutput
Throws:
java.io.IOException
writeBytes
- public void writeBytes(byte[] b)
- throws java.io.IOException
Description copied from interface:
MQDataOutput
Writes an array of bytes
Specified by:
writeBytes
in interface MQDataOutput
Parameters:
b
- array to write Throws:
java.io.IOException
writeBytes
- public void writeBytes(byte[] b,
- int off,
- int len,
- byte pad)
- throws java.io.IOException
Description copied from interface:
MQDataOutput
Writes a portion of an array of bytes into a fixed-length field, truncating
or padding as appropriate.
If the array is not long enough to fill the field, the remainder of
the field is padded with a given byte.
Specified by:
writeBytes
in interface MQDataOutput
Parameters:
b
- source byte array off
- Offset of the start of the portion of b to write len
- Number of bytes to write pad
- Padding byte to use if b is not long enough to provide len bytes after off. Throws:
java.io.IOException
writeMQBYTE
- public void writeMQBYTE(byte b)
- throws java.io.IOException
Description copied from interface:
MQDataOutput
Writes a single (signed) byte
Specified by:
writeMQBYTE
in interface MQDataOutput
Throws:
java.io.IOException
writeMQBYTE
- public void writeMQBYTE(byte[] b)
- throws java.io.IOException
Description copied from interface:
MQDataOutput
Writes an array of bytes
Specified by:
writeMQBYTE
in interface MQDataOutput
Parameters:
b
- array to write Throws:
java.io.IOException
writeMQBYTE
- public void writeMQBYTE(int fieldLen,
- byte[] b)
- throws java.io.IOException
Description copied from interface:
MQDataOutput
Writes an array of bytes, truncated or null-padded as
necessary, into a fixed-length field.
Specified by:
writeMQBYTE
in interface MQDataOutput
Parameters:
fieldLen
- Length of data to write b
- source byte array Throws:
java.io.IOException
writeMQBYTE
- public void writeMQBYTE(int fieldLen,
- byte[] b,
- byte pad)
- throws java.io.IOException
Description copied from interface:
MQDataOutput
Writes an array of bytes, truncated or padded as necessary, into a
fixed-length field.
Specified by:
writeMQBYTE
in interface MQDataOutput
Parameters:
fieldLen
- Length of data to write b
- source byte array pad
- byte to pad with if necessary Throws:
java.io.IOException
writeMQBYTE
- public void writeMQBYTE(int fieldLen,
- byte[] b,
- int off)
- throws java.io.IOException
Description copied from interface:
MQDataOutput
Writes an array of bytes, from an offset and truncated or null-padded as
necessary, into a fixed-length field
Specified by:
writeMQBYTE
in interface MQDataOutput
Parameters:
fieldLen
- Length of data to write b
- source byte array off
- offset of the start of the portion of b to write Throws:
java.io.IOException
writeMQBYTE
- public void writeMQBYTE(int fieldLen,
- byte[] b,
- int off,
- byte pad)
- throws java.io.IOException
Description copied from interface:
MQDataOutput
Writes an array of bytes, from an offset and truncated or padded as
necessary, into a fixed-length field
Specified by:
writeMQBYTE
in interface MQDataOutput
Parameters:
fieldLen
- Length of data to write b
- source byte array off
- offset of the start of the portion of b to write pad
- value to use for padding Throws:
java.io.IOException
writeMQBYTE8
- public void writeMQBYTE8(byte[] b)
- throws java.io.IOException
Description copied from interface:
MQDataOutput
Writes an 8-byte field from a byte array, truncated or null-padded as necessary.
Specified by:
writeMQBYTE8
in interface MQDataOutput
Parameters:
b
- source byte array Throws:
java.io.IOException
writeMQBYTE8
- public void writeMQBYTE8(byte[] b,
- int off)
- throws java.io.IOException
Description copied from interface:
MQDataOutput
Writes an 8-byte field from a byte array, starting at a given offset, and
truncating or null-padding as necessary.
Specified by:
writeMQBYTE8
in interface MQDataOutput
Parameters:
b
- source byte array off
- offset into b of start of data Throws:
java.io.IOException
writeMQBYTE16
- public void writeMQBYTE16(byte[] b)
- throws java.io.IOException
Description copied from interface:
MQDataOutput
Writes a 16-byte field from a byte array, truncated or null-padded as necessary.
Specified by:
writeMQBYTE16
in interface MQDataOutput
Parameters:
b
- source byte array Throws:
java.io.IOException
writeMQBYTE16
- public void writeMQBYTE16(byte[] b,
- int off)
- throws java.io.IOException
Description copied from interface:
MQDataOutput
Writes a 16-byte field from a byte array, starting at a given offset, and
truncating or null-padding as necessary.
Specified by:
writeMQBYTE16
in interface MQDataOutput
Parameters:
b
- source byte array off
- offset into b of start of data Throws:
java.io.IOException
writeMQBYTE24
- public void writeMQBYTE24(byte[] b)
- throws java.io.IOException
Description copied from interface:
MQDataOutput
Writes a 24-byte field from a byte array, truncated or null-padded as necessary.
Specified by:
writeMQBYTE24
in interface MQDataOutput
Parameters:
b
- source byte array Throws:
java.io.IOException
writeMQBYTE24
- public void writeMQBYTE24(byte[] b,
- int off)
- throws java.io.IOException
Description copied from interface:
MQDataOutput
Writes a 24-byte field from a byte array, starting at a given offset, and
truncating or null-padding as necessary.
Specified by:
writeMQBYTE24
in interface MQDataOutput
Parameters:
b
- source byte array off
- offset into b of start of data Throws:
java.io.IOException
writeMQBYTE32
- public void writeMQBYTE32(byte[] b)
- throws java.io.IOException
Description copied from interface:
MQDataOutput
Writes a 32-byte field from a byte array, truncated or null-padded as necessary.
Specified by:
writeMQBYTE32
in interface MQDataOutput
Parameters:
b
- source byte array Throws:
java.io.IOException
writeMQBYTE32
- public void writeMQBYTE32(byte[] b,
- int off)
- throws java.io.IOException
Description copied from interface:
MQDataOutput
Writes a 32-byte field from a byte array, starting at a given offset, and
truncating or null-padding as necessary.
Specified by:
writeMQBYTE32
in interface MQDataOutput
Parameters:
b
- source byte array off
- offset into b of start of data Throws:
java.io.IOException
writeMQCHAR
- public void writeMQCHAR(char c)
- throws java.io.IOException
Description copied from interface:
MQDataOutput
Writes a character to the stream as a single byte, converted according
to the current CCSID. Fails if the character is not represented by
a single byte.
Specified by:
writeMQCHAR
in interface MQDataOutput
Throws:
java.io.IOException
- if the character is not represented by a single byte,
or for unexpected error writeMQCHAR
- public void writeMQCHAR(char[] c)
- throws java.io.IOException
Description copied from interface:
MQDataOutput
Writes an array of characters to the stream, converted according to the
current CCSID.
Specified by:
writeMQCHAR
in interface MQDataOutput
Parameters:
c
- character array to write. Throws:
java.io.IOException
writeMQCHAR
- public void writeMQCHAR(int fieldLen,
- char[] c)
- throws java.io.IOException
Description copied from interface:
MQDataOutput
Writes a fixed-length field from an array of characters, converted according
to the current CCSID, and truncated or space-padded as necessary.
Specified by:
writeMQCHAR
in interface MQDataOutput
Parameters:
fieldLen
- number of bytes to write c
- character array to write. Throws:
java.io.IOException
writeMQCHAR
- public void writeMQCHAR(int fieldLen,
- char[] c,
- char pad)
- throws java.io.IOException
Description copied from interface:
MQDataOutput
Writes a fixed-length field from an array of characters, converted according
to the current CCSID, and truncated or padded as necessary.
Specified by:
writeMQCHAR
in interface MQDataOutput
Parameters:
fieldLen
- number of bytes to write c
- character array to write. pad
- character to use for padding Throws:
java.io.IOException
writeMQCHAR
- public void writeMQCHAR(int fieldLen,
- char[] c,
- int off)
- throws java.io.IOException
Description copied from interface:
MQDataOutput
Writes a fixed-length field from an offset into an array of characters,
converted according to the current CCSID, and truncated or space-padded
as necessary.
Specified by:
writeMQCHAR
in interface MQDataOutput
Parameters:
fieldLen
- number of bytes to write c
- character array to write. off
- offset of start of data in c Throws:
java.io.IOException
writeMQCHAR
- public void writeMQCHAR(int fieldLen,
- char[] c,
- int off,
- char pad)
- throws java.io.IOException
Description copied from interface:
MQDataOutput
Writes a fixed-length field from an offset into an array of characters,
converted according to the current CCSID, and truncated or padded
as necessary.
Specified by:
writeMQCHAR
in interface MQDataOutput
Parameters:
fieldLen
- number of bytes to write c
- character array to write. off
- offset of start of data in c pad
- character to use for padding Throws:
java.io.IOException
writeMQCHAR
- public void writeMQCHAR(java.lang.String s)
- throws java.io.IOException
Description copied from interface:
MQDataOutput
Writes a String to the stream, converted according to the
current CCSID.
Specified by:
writeMQCHAR
in interface MQDataOutput
Parameters:
s
- String to write. Throws:
java.io.IOException
writeMQCHAR
- public void writeMQCHAR(int fieldLen,
- java.lang.String s)
- throws java.io.IOException
Description copied from interface:
MQDataOutput
Writes a fixed-length field from a String, converted according
to the current CCSID, and truncated or space-padded as necessary.
Specified by:
writeMQCHAR
in interface MQDataOutput
Parameters:
fieldLen
- number of bytes to write s
- String to write. Throws:
java.io.IOException
writeMQCHAR
- public void writeMQCHAR(int fieldLen,
- java.lang.String s,
- char pad)
- throws java.io.IOException
Description copied from interface:
MQDataOutput
Writes a fixed-length field from a String, converted according
to the current CCSID, and truncated or padded as necessary.
Specified by:
writeMQCHAR
in interface MQDataOutput
Parameters:
fieldLen
- number of bytes to write s
- String to write. pad
- character to use for padding Throws:
java.io.IOException
writeMQCHAR4
- public void writeMQCHAR4(char[] c)
- throws java.io.IOException
Description copied from interface:
MQDataOutput
Writes a 4-byte field from a character array, converted according
to the current CCSID, and truncated or space-padded as necessary.
Specified by:
writeMQCHAR4
in interface MQDataOutput
Parameters:
c
- source character array Throws:
java.io.IOException
writeMQCHAR4
- public void writeMQCHAR4(char[] c,
- int off)
- throws java.io.IOException
Description copied from interface:
MQDataOutput
Writes a 4-byte field from an offset into a character array,
converted according to the current CCSID, and truncated or space- padded
as necessary
Specified by:
writeMQCHAR4
in interface MQDataOutput
Parameters:
c
- source character array off
- offset into c Throws:
java.io.IOException
writeMQCHAR4
- public void writeMQCHAR4(java.lang.String s)
- throws java.io.IOException
Description copied from interface:
MQDataOutput
Writes a 4-byte field from a String, converted according to the current
CCSID, and truncated or space-padded as necessary
Specified by:
writeMQCHAR4
in interface MQDataOutput
Parameters:
s
- String to write Throws:
java.io.IOException
writeMQCHAR8
- public void writeMQCHAR8(char[] c)
- throws java.io.IOException
Description copied from interface:
MQDataOutput
Writes an 8-byte field from a character array, converted according
to the current CCSID, and truncated or space-padded as necessary.
Specified by:
writeMQCHAR8
in interface MQDataOutput
Parameters:
c
- source character array Throws:
java.io.IOException
writeMQCHAR8
- public void writeMQCHAR8(char[] c,
- int off)
- throws java.io.IOException
Description copied from interface:
MQDataOutput
Writes an 8-byte field from an offset into a character array,
converted according to the current CCSID, and truncated or space- padded
as necessary
Specified by:
writeMQCHAR8
in interface MQDataOutput
Parameters:
c
- source character array off
- offset into c Throws:
java.io.IOException
writeMQCHAR8
- public void writeMQCHAR8(java.lang.String s)
- throws java.io.IOException
Description copied from interface:
MQDataOutput
Writes an 8-byte field from a String, converted according to the current
CCSID, and truncated or space-padded as necessary
Specified by:
writeMQCHAR8
in interface MQDataOutput
Parameters:
s
- String to write Throws:
java.io.IOException
writeMQCHAR12
- public void writeMQCHAR12(char[] c)
- throws java.io.IOException
Description copied from interface:
MQDataOutput
Writes a 12-byte field from a character array, converted according
to the current CCSID, and truncated or space-padded as necessary.
Specified by:
writeMQCHAR12
in interface MQDataOutput
Parameters:
c
- source character array Throws:
java.io.IOException
writeMQCHAR12
- public void writeMQCHAR12(char[] c,
- int off)
- throws java.io.IOException
Description copied from interface:
MQDataOutput
Writes a 12-byte field from an offset into a character array,
converted according to the current CCSID, and truncated or space- padded
as necessary
Specified by:
writeMQCHAR12
in interface MQDataOutput
Parameters:
c
- source character array off
- offset into c Throws:
java.io.IOException
writeMQCHAR12
- public void writeMQCHAR12(java.lang.String s)
- throws java.io.IOException
Description copied from interface:
MQDataOutput
Writes a 12-byte field from a String, converted according to the current
CCSID, and truncated or space-padded as necessary
Specified by:
writeMQCHAR12
in interface MQDataOutput
Parameters:
s
- String to write Throws:
java.io.IOException
writeMQCHAR16
- public void writeMQCHAR16(char[] c)
- throws java.io.IOException
Description copied from interface:
MQDataOutput
Writes a 16-byte field from a character array, converted according
to the current CCSID, and truncated or space-padded as necessary.
Specified by:
writeMQCHAR16
in interface MQDataOutput
Parameters:
c
- source character array Throws:
java.io.IOException
writeMQCHAR16
- public void writeMQCHAR16(char[] c,
- int off)
- throws java.io.IOException
Description copied from interface:
MQDataOutput
Writes a 16-byte field from an offset into a character array,
converted according to the current CCSID, and truncated or space- padded
as necessary
Specified by:
writeMQCHAR16
in interface MQDataOutput
Parameters:
c
- source character array off
- offset into c Throws:
java.io.IOException
writeMQCHAR16
- public void writeMQCHAR16(java.lang.String s)
- throws java.io.IOException
Description copied from interface:
MQDataOutput
Writes a 16-byte field from a String, converted according to the current
CCSID, and truncated or space-padded as necessary
Specified by:
writeMQCHAR16
in interface MQDataOutput
Parameters:
s
- String to write Throws:
java.io.IOException
writeMQCHAR20
- public void writeMQCHAR20(char[] c)
- throws java.io.IOException
Description copied from interface:
MQDataOutput
Writes a 20-byte field from a character array, converted according
to the current CCSID, and truncated or space-padded as necessary.
Specified by:
writeMQCHAR20
in interface MQDataOutput
Parameters:
c
- source character array Throws:
java.io.IOException
writeMQCHAR20
- public void writeMQCHAR20(char[] c,
- int off)
- throws java.io.IOException
Description copied from interface:
MQDataOutput
Writes a 20-byte field from an offset into a character array,
converted according to the current CCSID, and truncated or space- padded
as necessary
Specified by:
writeMQCHAR20
in interface MQDataOutput
Parameters:
c
- source character array off
- offset into c Throws:
java.io.IOException
writeMQCHAR20
- public void writeMQCHAR20(java.lang.String s)
- throws java.io.IOException
Description copied from interface:
MQDataOutput
Writes a 20-byte field from a String, converted according to the current
CCSID, and truncated or space-padded as necessary
Specified by:
writeMQCHAR20
in interface MQDataOutput
Parameters:
s
- String to write Throws:
java.io.IOException
writeMQCHAR24
- public void writeMQCHAR24(char[] c)
- throws java.io.IOException
Description copied from interface:
MQDataOutput
Writes a 24-byte field from a character array, converted according
to the current CCSID, and truncated or space-padded as necessary.
Specified by:
writeMQCHAR24
in interface MQDataOutput
Parameters:
c
- source character array Throws:
java.io.IOException
writeMQCHAR24
- public void writeMQCHAR24(char[] c,
- int off)
- throws java.io.IOException
Description copied from interface:
MQDataOutput
Writes a 24-byte field from an offset into a character array,
converted according to the current CCSID, and truncated or space- padded
as necessary
Specified by:
writeMQCHAR24
in interface MQDataOutput
Parameters:
c
- source character array off
- offset into c Throws:
java.io.IOException
writeMQCHAR24
- public void writeMQCHAR24(java.lang.String s)
- throws java.io.IOException
Description copied from interface:
MQDataOutput
Writes a 24-byte field from a String, converted according to the current
CCSID, and truncated or space-padded as necessary
Specified by:
writeMQCHAR24
in interface MQDataOutput
Parameters:
s
- String to write Throws:
java.io.IOException
writeMQCHAR28
- public void writeMQCHAR28(char[] c)
- throws java.io.IOException
Description copied from interface:
MQDataOutput
Writes a 28-byte field from a character array, converted according
to the current CCSID, and truncated or space-padded as necessary.
Specified by:
writeMQCHAR28
in interface MQDataOutput
Parameters:
c
- source character array Throws:
java.io.IOException
writeMQCHAR28
- public void writeMQCHAR28(char[] c,
- int off)
- throws java.io.IOException
Description copied from interface:
MQDataOutput
Writes a 28-byte field from an offset into a character array,
converted according to the current CCSID, and truncated or space- padded
as necessary
Specified by:
writeMQCHAR28
in interface MQDataOutput
Parameters:
c
- source character array off
- offset into c Throws:
java.io.IOException
writeMQCHAR28
- public void writeMQCHAR28(java.lang.String s)
- throws java.io.IOException
Description copied from interface:
MQDataOutput
Writes a 28-byte field from a String, converted according to the current
CCSID, and truncated or space-padded as necessary
Specified by:
writeMQCHAR28
in interface MQDataOutput
Parameters:
s
- String to write Throws:
java.io.IOException
writeMQCHAR32
- public void writeMQCHAR32(char[] c)
- throws java.io.IOException
Description copied from interface:
MQDataOutput
Writes a 32-byte field from a character array, converted according
to the current CCSID, and truncated or space-padded as necessary.
Specified by:
writeMQCHAR32
in interface MQDataOutput
Parameters:
c
- source character array Throws:
java.io.IOException
writeMQCHAR32
- public void writeMQCHAR32(char[] c,
- int off)
- throws java.io.IOException
Description copied from interface:
MQDataOutput
Writes a 32-byte field from an offset into a character array,
converted according to the current CCSID, and truncated or space- padded
as necessary
Specified by:
writeMQCHAR32
in interface MQDataOutput
Parameters:
c
- source character array off
- offset into c Throws:
java.io.IOException
writeMQCHAR32
- public void writeMQCHAR32(java.lang.String s)
- throws java.io.IOException
Description copied from interface:
MQDataOutput
Writes a 32-byte field from a String, converted according to the current
CCSID, and truncated or space-padded as necessary
Specified by:
writeMQCHAR32
in interface MQDataOutput
Parameters:
s
- String to write Throws:
java.io.IOException
writeMQCHAR48
- public void writeMQCHAR48(char[] c)
- throws java.io.IOException
Description copied from interface:
MQDataOutput
Writes a 48-byte field from a character array, converted according
to the current CCSID, and truncated or space-padded as necessary.
Specified by:
writeMQCHAR48
in interface MQDataOutput
Parameters:
c
- source character array Throws:
java.io.IOException
writeMQCHAR48
- public void writeMQCHAR48(char[] c,
- int off)
- throws java.io.IOException
Description copied from interface:
MQDataOutput
Writes a 48-byte field from an offset into a character array,
converted according to the current CCSID, and truncated or space- padded
as necessary
Specified by:
writeMQCHAR48
in interface MQDataOutput
Parameters:
c
- source character array off
- offset into c Throws:
java.io.IOException
writeMQCHAR48
- public void writeMQCHAR48(java.lang.String s)
- throws java.io.IOException
Description copied from interface:
MQDataOutput
Writes a 48-byte field from a String, converted according to the current
CCSID, and truncated or space-padded as necessary
Specified by:
writeMQCHAR48
in interface MQDataOutput
Parameters:
s
- String to write Throws:
java.io.IOException
writeMQCHAR64
- public void writeMQCHAR64(char[] c)
- throws java.io.IOException
Description copied from interface:
MQDataOutput
Writes a 64-byte field from a character array, converted according
to the current CCSID, and truncated or space-padded as necessary.
Specified by:
writeMQCHAR64
in interface MQDataOutput
Parameters:
c
- source character array Throws:
java.io.IOException
writeMQCHAR64
- public void writeMQCHAR64(char[] c,
- int off)
- throws java.io.IOException
Description copied from interface:
MQDataOutput
Writes a 64-byte field from an offset into a character array,
converted according to the current CCSID, and truncated or space- padded
as necessary
Specified by:
writeMQCHAR64
in interface MQDataOutput
Parameters:
c
- source character array off
- offset into c Throws:
java.io.IOException
writeMQCHAR64
- public void writeMQCHAR64(java.lang.String s)
- throws java.io.IOException
Description copied from interface:
MQDataOutput
Writes a 64-byte field from a String, converted according to the current
CCSID, and truncated or space-padded as necessary
Specified by:
writeMQCHAR64
in interface MQDataOutput
Parameters:
s
- String to write Throws:
java.io.IOException
writeMQCHAR128
- public void writeMQCHAR128(char[] c)
- throws java.io.IOException
Description copied from interface:
MQDataOutput
Writes a 128-byte field from a character array, converted according
to the current CCSID, and truncated or space-padded as necessary.
Specified by:
writeMQCHAR128
in interface MQDataOutput
Parameters:
c
- source character array Throws:
java.io.IOException
writeMQCHAR128
- public void writeMQCHAR128(char[] c,
- int off)
- throws java.io.IOException
Description copied from interface:
MQDataOutput
Writes a 128-byte field from an offset into a character array,
converted according to the current CCSID, and truncated or space- padded
as necessary
Specified by:
writeMQCHAR128
in interface MQDataOutput
Parameters:
c
- source character array off
- offset into c Throws:
java.io.IOException
writeMQCHAR128
- public void writeMQCHAR128(java.lang.String s)
- throws java.io.IOException
Description copied from interface:
MQDataOutput
Writes a 128-byte field from a String, converted according to the current
CCSID, and truncated or space-padded as necessary
Specified by:
writeMQCHAR128
in interface MQDataOutput
Parameters:
s
- String to write Throws:
java.io.IOException
writeMQCHAR256
- public void writeMQCHAR256(char[] c)
- throws java.io.IOException
Description copied from interface:
MQDataOutput
Writes a 256-byte field from a character array, converted according
to the current CCSID, and truncated or space-padded as necessary.
Specified by:
writeMQCHAR256
in interface MQDataOutput
Parameters:
c
- source character array Throws:
java.io.IOException
writeMQCHAR256
- public void writeMQCHAR256(char[] c,
- int off)
- throws java.io.IOException
Description copied from interface:
MQDataOutput
Writes a 256-byte field from an offset into a character array,
converted according to the current CCSID, and truncated or space- padded
as necessary
Specified by:
writeMQCHAR256
in interface MQDataOutput
Parameters:
c
- source character array off
- offset into c Throws:
java.io.IOException
writeMQCHAR256
- public void writeMQCHAR256(java.lang.String s)
- throws java.io.IOException
Description copied from interface:
MQDataOutput
Writes a 256-byte field from a String, converted according to the current
CCSID, and truncated or space-padded as necessary
Specified by:
writeMQCHAR256
in interface MQDataOutput
Parameters:
s
- String to write Throws:
java.io.IOException
writeUCS2Char
- public void writeUCS2Char(char c)
- throws java.io.IOException
Description copied from interface:
MQDataOutput
Writes a single Unicode character as two-byte UCS-2.
The byte order is determined by the current integer encoding.
Specified by:
writeUCS2Char
in interface MQDataOutput
Parameters:
c
- character to write Throws:
java.io.IOException
writeUTF
- public void writeUTF(java.lang.String s)
- throws java.io.IOException
Description copied from interface:
MQDataOutput
Writes a String using UTF-8. The String is preceeded by two bytes
which give the length of the string. Compatible with DataInput.readUTF().
Specified by:
writeUTF
in interface MQDataOutput
Parameters:
s
- String to write Throws:
java.io.IOException
See Also:
DataOutput.writeUTF(String)
writeShort
- public void writeShort(short s)
- throws java.io.IOException
Description copied from interface:
MQDataOutput
Writes a short as two bytes. The byte order is determined by the
current integer encoding.
Specified by:
writeShort
in interface MQDataOutput
Parameters:
s
- short to write Throws:
java.io.IOException
See Also:
DataOutput.writeShort(int)
writeMQSHORT
- public void writeMQSHORT(short s)
- throws java.io.IOException
Description copied from interface:
MQDataOutput
Writes a short as two bytes. The byte order is determined by the
current integer encoding.
Specified by:
writeMQSHORT
in interface MQDataOutput
Parameters:
s
- short to write Throws:
java.io.IOException
writeMQUSHORT
- public void writeMQUSHORT(int i)
- throws java.io.IOException
Description copied from interface:
MQDataOutput
Writes a two-byte unsigned short integer. The byte order is determined
by the current integer encoding.
Specified by:
writeMQUSHORT
in interface MQDataOutput
Parameters:
i
- integer to write Throws:
java.io.IOException
writeInt
- public void writeInt(int i)
- throws java.io.IOException
Description copied from interface:
MQDataOutput
Writes an int as four bytes. The byte order is determined by the
current integer encoding.
Specified by:
writeInt
in interface MQDataOutput
Parameters:
i
- int to write Throws:
java.io.IOException
See Also:
DataOutput.writeInt(int)
writeMQLONG
- public void writeMQLONG(int i)
- throws java.io.IOException
Description copied from interface:
MQDataOutput
Writes an int as four bytes. The byte order is determined by the
current integer encoding.
Specified by:
writeMQLONG
in interface MQDataOutput
Parameters:
i
- int to write Throws:
java.io.IOException
writeMQULONG
- public void writeMQULONG(long l)
- throws java.io.IOException
Description copied from interface:
MQDataOutput
Writes a four-byte unsigned integer. The byte order is determined
by the current integer encoding.
Specified by:
writeMQULONG
in interface MQDataOutput
Parameters:
l
- integer to write Throws:
java.io.IOException
writeMQINT32
- public void writeMQINT32(int i)
- throws java.io.IOException
Description copied from interface:
MQDataOutput
Writes an int as four bytes. The byte order is determined by the
current integer encoding.
Specified by:
writeMQINT32
in interface MQDataOutput
Parameters:
i
- int to write Throws:
java.io.IOException
See Also:
DataOutput.writeInt(int)
writeMQUINT32
- public void writeMQUINT32(long l)
- throws java.io.IOException
Description copied from interface:
MQDataOutput
Writes four-byte unsigned integer. The byte order is determined
by the current integer encoding.
Specified by:
writeMQUINT32
in interface MQDataOutput
Parameters:
l
- integer to write Throws:
java.io.IOException
writeLong
- public void writeLong(long l)
- throws java.io.IOException
Description copied from interface:
MQDataOutput
Writes a long as eight bytes. The byte order is determined by the
current integer encoding.
Specified by:
writeLong
in interface MQDataOutput
Parameters:
l
- long to write Throws:
java.io.IOException
See Also:
DataOutput.writeInt(int)
writeMQINT64
- public void writeMQINT64(long l)
- throws java.io.IOException
Description copied from interface:
MQDataOutput
Writes a long as eight bytes. The byte order is determined by the
current integer encoding.
Specified by:
writeMQINT64
in interface MQDataOutput
Parameters:
l
- long to write Throws:
java.io.IOException
writeMQUINT64
- public void writeMQUINT64(java.math.BigInteger i)
- throws java.io.IOException
Description copied from interface:
MQDataOutput
Writes an eight-byte unsigned integer. The byte order is determined
by the current integer encoding.
Specified by:
writeMQUINT64
in interface MQDataOutput
Parameters:
i
- integer to write Throws:
java.io.IOException
writeFloat
- public void writeFloat(float f)
- throws java.io.IOException
Description copied from interface:
MQDataOutput
Writes a float as four bytes, according to the current floating-point encoding.
If the S390 encoding is used, this uses the short HFP format. Note that conversion
to this format from a Java float may lose precision.
Specified by:
writeFloat
in interface MQDataOutput
Parameters:
f
- float to write Throws:
java.io.IOException
See Also:
DataOutput.writeFloat(float)
writeDouble
- public void writeDouble(double d)
- throws java.io.IOException
Description copied from interface:
MQDataOutput
Writes a double as eight bytes, according to the current floating-point encoding.
If the S390 encoding is used, this uses the long HFP format. Note that conversion
to this format from a Java double may lose precision.
Specified by:
writeDouble
in interface MQDataOutput
Parameters:
d
- float to write Throws:
java.io.IOException
See Also:
DataOutput.writeDouble(double)
writeDecimal
- public void writeDecimal(int fieldLen,
- java.math.BigInteger bi)
- throws java.io.IOException
Description copied from interface:
MQDataOutput
Writes a packed-decimal integer into a fixed-length field. The current packed-decimal
encoding determines the byte order.
Specified by:
writeDecimal
in interface MQDataOutput
Parameters:
fieldLen
- number of bytes to write bi
- the BigInteger to write as packed-decimal. Throws:
java.io.IOException
- if a malformed packed-decimal is encountered, or for other error. writeDecimal2
- public void writeDecimal2(short s)
- throws java.io.IOException
Description copied from interface:
MQDataOutput
Writes a two-byte packed decimal integer. The current packed-decimal encoding
determines the byte order
Specified by:
writeDecimal2
in interface MQDataOutput
Parameters:
s
- integer to write as packed-decimal Throws:
java.io.IOException
writeDecimal4
- public void writeDecimal4(int i)
- throws java.io.IOException
Description copied from interface:
MQDataOutput
Writes a four-byte packed decimal integer. The current packed-decimal encoding
determines the byte order
Specified by:
writeDecimal4
in interface MQDataOutput
Parameters:
i
- integer to write as packed-decimal Throws:
java.io.IOException
writeDecimal8
- public void writeDecimal8(long l)
- throws java.io.IOException
Description copied from interface:
MQDataOutput
Writes an eight-byte packed decimal integer. The current packed-decimal encoding
determines the byte order
Specified by:
writeDecimal8
in interface MQDataOutput
Parameters:
l
- integer to write as packed-decimal Throws:
java.io.IOException
writeObject
- public void writeObject(java.lang.Object object)
- throws java.io.IOException
Description copied from interface:
MQDataOutput
Writes a Serializable java Object to the stream
Specified by:
writeObject
in interface MQDataOutput
Parameters:
object
- object to serialize Throws:
java.io.NotSerializableException
- if object a non-Serializable object is encountered java.io.IOException
See Also:
ObjectOutput.writeObject(Object)
MQDataOutput