public interface MQDataInput
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
COPYRIGHT |
Modifier and Type | Method and Description |
---|---|
int |
getCCSID()
Returns the Coded Character Set Identifier currently used for
character read operations
|
int |
getDataOffset()
Returns the current offset of the cursor, relative to the position where
this MQDataOutput object was originally created.
|
DecimalEncoding |
getDecimalEncoding()
Returns the DecimalEncoding currently used for packed-decimal read operations.
|
int |
getEncoding()
Return the WMQ encoding identifier representing the three encodings (integer,
floating-point and packed-decimal) currently used for numeric read operations.
|
FloatEncoding |
getFloatEncoding()
Returns the FloatEncoding currently used for floating-point read operations.
|
IntegerEncoding |
getIntegerEncoding()
Returns the IntegerEncoding currently used for integer read operations.
|
byte |
readByte()
Reads a single (signed) byte.
|
byte[] |
readBytes(int length)
Reads a number of (signed) bytes from the stream, returning them as an array.
|
java.math.BigInteger |
readDecimal(int length)
Reads a number of bytes as a packed-decimal integer.
|
short |
readDecimal2()
Reads two bytes as a packed-decimal integer.
|
int |
readDecimal4()
Reads four bytes as a packed-decimal integer.
|
long |
readDecimal8()
Reads eight bytes as a packed-decimal integer.
|
double |
readDouble()
Reads eight bytes as a floating-point number, interpreted according to the
current floating-point encoding.
|
float |
readFloat()
Reads four bytes as a floating-point number, interpreted according to the
current floating-point encoding.
|
void |
readFully(byte[] b)
Reads bytes into the parameter byte array.
|
void |
readFully(byte[] b,
int off,
int len)
Reads some number of bytes into a bytearray beginning from a given
offset into the byte array.
|
int |
readInt()
Reads four bytes as a signed integer.
|
long |
readLong()
Reads eight bytes as a signed long integer.
|
byte |
readMQBYTE()
Reads a single (signed) byte.
|
byte[] |
readMQBYTE(int length)
Reads a number of (signed) bytes from the stream, returning them as an array.
|
byte[] |
readMQBYTE16()
Reads 16 bytes from the stream, returning them as an array.
|
byte[] |
readMQBYTE24()
Reads 24 bytes from the stream, returning them as an array.
|
byte[] |
readMQBYTE32()
Reads 32 bytes from the stream, returning them as an array.
|
byte[] |
readMQBYTE8()
Reads 8 bytes from the stream, returning them as an array.
|
char |
readMQCHAR()
Reads a single byte from the stream and converts it to a character,
using the current CCSID.
|
java.lang.String |
readMQCHAR(int length)
Reads a number of bytes from the stream and converts them into
a String, using the current CCSID.
|
java.lang.String |
readMQCHAR12()
Reads 12 bytes from the stream and converts them into a String, using
the current CCSID.
|
java.lang.String |
readMQCHAR128()
Reads 128 bytes from the stream and converts them into a String, using
the current CCSID.
|
java.lang.String |
readMQCHAR16()
Reads 16 bytes from the stream and converts them into a String, using
the current CCSID.
|
java.lang.String |
readMQCHAR20()
Reads 20 bytes from the stream and converts them into a String, using
the current CCSID.
|
java.lang.String |
readMQCHAR24()
Reads 24 bytes from the stream and converts them into a String, using
the current CCSID.
|
java.lang.String |
readMQCHAR256()
Reads 256 bytes from the stream and converts them into a String, using
the current CCSID.
|
java.lang.String |
readMQCHAR28()
Reads 28 bytes from the stream and converts them into a String, using
the current CCSID.
|
java.lang.String |
readMQCHAR32()
Reads 32 bytes from the stream and converts them into a String, using
the current CCSID.
|
java.lang.String |
readMQCHAR4()
Reads 4 bytes from the stream and converts them into a String, using
the current CCSID.
|
java.lang.String |
readMQCHAR48()
Reads 48 bytes from the stream and converts them into a String, using
the current CCSID.
|
java.lang.String |
readMQCHAR64()
Reads 64 bytes from the stream and converts them into a String, using
the current CCSID.
|
java.lang.String |
readMQCHAR8()
Reads 8 bytes from the stream and converts them into a String, using
the current CCSID.
|
int |
readMQINT32()
Reads four bytes as a signed integer.
|
long |
readMQINT64()
Reads eight bytes as a signed long integer.
|
int |
readMQLONG()
Reads four bytes as a signed integer.
|
short |
readMQSHORT()
Reads two bytes as a signed short.
|
long |
readMQUINT32()
Reads four bytes as an unsigned integer.
|
java.math.BigInteger |
readMQUINT64()
Reads eight bytes as an unsigned integer.
|
long |
readMQULONG()
Reads four bytes as an unsigned integer.
|
int |
readMQUSHORT()
Reads two bytes as an unsigned integer.
|
java.lang.Object |
readObject()
Reads a serialized Java Object from the stream
|
short |
readShort()
Reads two bytes as a signed short.
|
char |
readUCS2Char()
Reads two bytes from the stream and interprets it as a Unicode character.
|
java.lang.String |
readUTF()
Reads a UTF-8 encoded string from the stream.
|
void |
setCCSID(int ccsid)
Sets the Coded Character Set Identifier to be used for subsequent
character read operations.
|
void |
setDecimalEncoding(DecimalEncoding de)
Sets the DecimalEncoding to be used for subsequent packed-decimal
read operations.
|
void |
setEncoding(int encoding)
Sets all three encoding values - integer, floating-point and packed-decimal,
using the WMQ encoding identifier.
|
void |
setFloatEncoding(FloatEncoding fe)
Sets the FloatEncoding to be used for subsequent floating-point
read operations.
|
void |
setIntegerEncoding(IntegerEncoding ie)
Sets the IntegerEncoding to be uesd for subsequence integer read
operations.
|
int |
skipBytes(int n)
Attempts to skip over a number of bytes, returning the number of bytes
actually skipped.
|
static final java.lang.String COPYRIGHT
void setCCSID(int ccsid) throws java.io.IOException
ccsid
- new CCSID valuejava.nio.charset.UnsupportedCharsetException
- if the JDK does not support
this character setjava.io.IOException
int getCCSID() throws java.io.IOException
java.io.IOException
void setIntegerEncoding(IntegerEncoding ie) throws java.io.IOException
ie
- new integer encoding valuejava.io.IOException
IntegerEncoding
IntegerEncoding getIntegerEncoding() throws java.io.IOException
java.io.IOException
IntegerEncoding
void setFloatEncoding(FloatEncoding fe) throws java.io.IOException
fe
- new floating-point encoding valuejava.io.IOException
FloatEncoding
FloatEncoding getFloatEncoding() throws java.io.IOException
java.io.IOException
FloatEncoding
void setDecimalEncoding(DecimalEncoding de) throws java.io.IOException
de
- new packed-decimal encoding valuejava.io.IOException
DecimalEncoding
DecimalEncoding getDecimalEncoding() throws java.io.IOException
java.io.IOException
DecimalEncoding
void setEncoding(int encoding) throws java.io.IOException
encoding
- integer representation of the new encodingjava.lang.IllegalArgumentException
- if passed an unrecognised encoding identifierjava.io.IOException
int getEncoding() throws java.io.IOException
java.io.IOException
int getDataOffset() throws java.io.IOException
java.io.IOException
int skipBytes(int n) throws java.io.IOException
n
- number of bytes to attempt to skipjava.io.IOException
DataInput.skipBytes(int)
byte readByte() throws java.io.IOException
java.io.EOFException
- if at the end of the streamjava.io.IOException
byte[] readBytes(int length) throws java.io.IOException
length
- number of bytes to readjava.io.EOFException
- if at the end of the streamjava.io.IOException
byte readMQBYTE() throws java.io.IOException
java.io.EOFException
- if at the end of the streamjava.io.IOException
byte[] readMQBYTE(int length) throws java.io.IOException
length
- number of bytes to readjava.io.EOFException
- if at the end of the streamjava.io.IOException
byte[] readMQBYTE8() throws java.io.IOException
java.io.EOFException
- if at the end of the streamjava.io.IOException
byte[] readMQBYTE16() throws java.io.IOException
java.io.EOFException
- if at the end of the streamjava.io.IOException
byte[] readMQBYTE24() throws java.io.IOException
java.io.EOFException
- if at the end of the streamjava.io.IOException
byte[] readMQBYTE32() throws java.io.IOException
java.io.EOFException
- if at the end of the streamjava.io.IOException
void readFully(byte[] b) throws java.io.IOException
b
- byte array to read intojava.lang.NullPointerException
- if b is nulljava.io.EOFException
- if the stream does not have enough data left to
fill the byte arrayjava.io.IOException
DataInput.readFully(byte[])
void readFully(byte[] b, int off, int len) throws java.io.IOException
b
- byte array to read intooff
- starting index in the byte arraylen
- number of bytes to readjava.lang.NullPointerException
- if b is nulljava.lang.IndexOutOfBoundsException
- if off is negative, len is negative, or
off+len is greater than the length of bjava.io.EOFException
- if the stream ends before len bytes have been readjava.io.IOException
DataInput.readFully(byte[], int, int)
char readMQCHAR() throws java.io.IOException
java.io.EOFException
- at end of streamjava.io.IOException
- if the next byte does not completely represent
a single character, or for unexpected errors.java.lang.String readMQCHAR(int length) throws java.io.IOException
length
- number of bytes to readjava.nio.charset.CharacterCodingException
- if conversion failsjava.io.EOFException
- at end of streamjava.io.IOException
java.lang.String readMQCHAR4() throws java.io.IOException
java.nio.charset.CharacterCodingException
- if conversion failsjava.io.EOFException
- at end of streamjava.io.IOException
java.lang.String readMQCHAR8() throws java.io.IOException
java.nio.charset.CharacterCodingException
- if conversion failsjava.io.EOFException
- at end of streamjava.io.IOException
java.lang.String readMQCHAR12() throws java.io.IOException
java.nio.charset.CharacterCodingException
- if conversion failsjava.io.EOFException
- at end of streamjava.io.IOException
java.lang.String readMQCHAR16() throws java.io.IOException
java.nio.charset.CharacterCodingException
- if conversion failsjava.io.EOFException
- at end of streamjava.io.IOException
java.lang.String readMQCHAR20() throws java.io.IOException
java.nio.charset.CharacterCodingException
- if conversion failsjava.io.EOFException
- at end of streamjava.io.IOException
java.lang.String readMQCHAR24() throws java.io.IOException
java.nio.charset.CharacterCodingException
- if conversion failsjava.io.EOFException
- at end of streamjava.io.IOException
java.lang.String readMQCHAR28() throws java.io.IOException
java.nio.charset.CharacterCodingException
- if conversion failsjava.io.EOFException
- at end of streamjava.io.IOException
java.lang.String readMQCHAR32() throws java.io.IOException
java.nio.charset.CharacterCodingException
- if conversion failsjava.io.EOFException
- at end of streamjava.io.IOException
java.lang.String readMQCHAR48() throws java.io.IOException
java.nio.charset.CharacterCodingException
- if conversion failsjava.io.EOFException
- at end of streamjava.io.IOException
java.lang.String readMQCHAR64() throws java.io.IOException
java.nio.charset.CharacterCodingException
- if conversion failsjava.io.EOFException
- at end of streamjava.io.IOException
java.lang.String readMQCHAR128() throws java.io.IOException
java.nio.charset.CharacterCodingException
- if conversion failsjava.io.EOFException
- at end of streamjava.io.IOException
java.lang.String readMQCHAR256() throws java.io.IOException
java.nio.charset.CharacterCodingException
- if conversion failsjava.io.EOFException
- at end of streamjava.io.IOException
char readUCS2Char() throws java.io.IOException
java.io.EOFException
- at end of streamjava.io.IOException
java.lang.String readUTF() throws java.io.IOException
java.io.EOFException
- at end of streamjava.io.UTFDataFormatException
- if the stream does not contain a valid UTF-8 stringjava.io.IOException
DataInput.readUTF()
short readShort() throws java.io.IOException
java.io.EOFException
- at end of streamjava.io.IOException
DataInput.readShort()
short readMQSHORT() throws java.io.IOException
java.io.EOFException
- at end of streamjava.io.IOException
int readMQUSHORT() throws java.io.IOException
java.io.EOFException
- at end of streamjava.io.IOException
int readInt() throws java.io.IOException
java.io.EOFException
- at end of streamjava.io.IOException
DataInput.readInt()
int readMQLONG() throws java.io.IOException
java.io.EOFException
- at end of streamjava.io.IOException
long readMQULONG() throws java.io.IOException
java.io.EOFException
- at end of streamjava.io.IOException
int readMQINT32() throws java.io.IOException
java.io.EOFException
- at end of streamjava.io.IOException
long readMQUINT32() throws java.io.IOException
java.io.EOFException
- at end of streamjava.io.IOException
long readLong() throws java.io.IOException
java.io.EOFException
- at end of streamjava.io.IOException
DataInput.readLong()
long readMQINT64() throws java.io.IOException
java.io.EOFException
- at end of streamjava.io.IOException
java.math.BigInteger readMQUINT64() throws java.io.IOException
java.io.EOFException
- at end of streamjava.io.IOException
float readFloat() throws java.io.IOException
java.io.EOFException
- at end of streamjava.io.IOException
DataInput.readFloat()
double readDouble() throws java.io.IOException
java.io.EOFException
- at end of streamjava.io.IOException
DataInput.readFloat()
java.math.BigInteger readDecimal(int length) throws java.io.IOException
Unsigned packed-decimals are treated as positive; this method cannot distinguish between positive and negative zero.
length
- number of bytes to readjava.io.EOFException
- at end of streamjava.io.IOException
- if a malformed packed-decimal is encountered, or for other error.short readDecimal2() throws java.io.IOException
Unsigned packed-decimals are treated as positive; this method cannot distinguish between positive and negative zero.
java.io.EOFException
- at end of streamjava.io.IOException
- if a malformed packed-decimal is encountered, or for other error.int readDecimal4() throws java.io.IOException
Unsigned packed-decimals are treated as positive; this method cannot distinguish between positive and negative zero.
java.io.EOFException
- at end of streamjava.io.IOException
- if a malformed packed-decimal is encountered, or for other error.long readDecimal8() throws java.io.IOException
Unsigned packed-decimals are treated as positive; this method cannot distinguish between positive and negative zero.
java.io.EOFException
- at end of streamjava.io.IOException
- if a malformed packed-decimal is encountered, or for other error.java.lang.Object readObject() throws java.io.IOException, java.lang.ClassNotFoundException
java.io.IOException
java.lang.ClassNotFoundException
ObjectInput.readObject()