|
IBM WebSphere Application ServerTM Release 8 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface MQDataInput
An MQDataInput implementation allows read access to some underlying store of semi-structured binary data. It provides read methods for character data, integer data, floating-point data, packed decimal data and serialized Java objects. It converts between different representations of this data (e.g. EBCDIC/ASCII character data, big-endian and little-endian integer data) driven by the CCSID and encoding properties. It is intended for reading WebSphere MQ message data, and uses WMQ conventions.
Field Summary | |
---|---|
static java.lang.String |
COPYRIGHT
|
Method Summary | |
---|---|
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. |
Field Detail |
---|
static final java.lang.String COPYRIGHT
Method Detail |
---|
void setCCSID(int ccsid) throws java.io.IOException
ccsid
- new CCSID value
java.nio.charset.UnsupportedCharsetException
- if the JDK does not support
this character set
java.io.IOException
int getCCSID() throws java.io.IOException
java.io.IOException
void setIntegerEncoding(IntegerEncoding ie) throws java.io.IOException
ie
- new integer encoding value
java.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 value
java.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 value
java.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 encoding
java.lang.IllegalArgumentException
- if passed an unrecognised encoding identifier
java.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 skip
java.io.IOException
DataInput.skipBytes(int)
byte readByte() throws java.io.IOException
java.io.EOFException
- if at the end of the stream
java.io.IOException
byte[] readBytes(int length) throws java.io.IOException
length
- number of bytes to read
java.io.EOFException
- if at the end of the stream
java.io.IOException
byte readMQBYTE() throws java.io.IOException
java.io.EOFException
- if at the end of the stream
java.io.IOException
byte[] readMQBYTE(int length) throws java.io.IOException
length
- number of bytes to read
java.io.EOFException
- if at the end of the stream
java.io.IOException
byte[] readMQBYTE8() throws java.io.IOException
java.io.EOFException
- if at the end of the stream
java.io.IOException
byte[] readMQBYTE16() throws java.io.IOException
java.io.EOFException
- if at the end of the stream
java.io.IOException
byte[] readMQBYTE24() throws java.io.IOException
java.io.EOFException
- if at the end of the stream
java.io.IOException
byte[] readMQBYTE32() throws java.io.IOException
java.io.EOFException
- if at the end of the stream
java.io.IOException
void readFully(byte[] b) throws java.io.IOException
b
- byte array to read into
java.lang.NullPointerException
- if b is null
java.io.EOFException
- if the stream does not have enough data left to
fill the byte array
java.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 read
java.lang.NullPointerException
- if b is null
java.lang.IndexOutOfBoundsException
- if off is negative, len is negative, or
off+len is greater than the length of b
java.io.EOFException
- if the stream ends before len bytes have been read
java.io.IOException
DataInput.readFully(byte[], int, int)
char readMQCHAR() throws java.io.IOException
java.io.EOFException
- at end of stream
java.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 read
java.nio.charset.CharacterCodingException
- if conversion fails
java.io.EOFException
- at end of stream
java.io.IOException
java.lang.String readMQCHAR4() throws java.io.IOException
java.nio.charset.CharacterCodingException
- if conversion fails
java.io.EOFException
- at end of stream
java.io.IOException
java.lang.String readMQCHAR8() throws java.io.IOException
java.nio.charset.CharacterCodingException
- if conversion fails
java.io.EOFException
- at end of stream
java.io.IOException
java.lang.String readMQCHAR12() throws java.io.IOException
java.nio.charset.CharacterCodingException
- if conversion fails
java.io.EOFException
- at end of stream
java.io.IOException
java.lang.String readMQCHAR16() throws java.io.IOException
java.nio.charset.CharacterCodingException
- if conversion fails
java.io.EOFException
- at end of stream
java.io.IOException
java.lang.String readMQCHAR20() throws java.io.IOException
java.nio.charset.CharacterCodingException
- if conversion fails
java.io.EOFException
- at end of stream
java.io.IOException
java.lang.String readMQCHAR24() throws java.io.IOException
java.nio.charset.CharacterCodingException
- if conversion fails
java.io.EOFException
- at end of stream
java.io.IOException
java.lang.String readMQCHAR28() throws java.io.IOException
java.nio.charset.CharacterCodingException
- if conversion fails
java.io.EOFException
- at end of stream
java.io.IOException
java.lang.String readMQCHAR32() throws java.io.IOException
java.nio.charset.CharacterCodingException
- if conversion fails
java.io.EOFException
- at end of stream
java.io.IOException
java.lang.String readMQCHAR48() throws java.io.IOException
java.nio.charset.CharacterCodingException
- if conversion fails
java.io.EOFException
- at end of stream
java.io.IOException
java.lang.String readMQCHAR64() throws java.io.IOException
java.nio.charset.CharacterCodingException
- if conversion fails
java.io.EOFException
- at end of stream
java.io.IOException
java.lang.String readMQCHAR128() throws java.io.IOException
java.nio.charset.CharacterCodingException
- if conversion fails
java.io.EOFException
- at end of stream
java.io.IOException
java.lang.String readMQCHAR256() throws java.io.IOException
java.nio.charset.CharacterCodingException
- if conversion fails
java.io.EOFException
- at end of stream
java.io.IOException
char readUCS2Char() throws java.io.IOException
java.io.EOFException
- at end of stream
java.io.IOException
java.lang.String readUTF() throws java.io.IOException
java.io.EOFException
- at end of stream
java.io.UTFDataFormatException
- if the stream does not contain a valid UTF-8 string
java.io.IOException
DataInput.readUTF()
short readShort() throws java.io.IOException
java.io.EOFException
- at end of stream
java.io.IOException
DataInput.readShort()
short readMQSHORT() throws java.io.IOException
java.io.EOFException
- at end of stream
java.io.IOException
int readMQUSHORT() throws java.io.IOException
java.io.EOFException
- at end of stream
java.io.IOException
int readInt() throws java.io.IOException
java.io.EOFException
- at end of stream
java.io.IOException
DataInput.readInt()
int readMQLONG() throws java.io.IOException
java.io.EOFException
- at end of stream
java.io.IOException
long readMQULONG() throws java.io.IOException
java.io.EOFException
- at end of stream
java.io.IOException
int readMQINT32() throws java.io.IOException
java.io.EOFException
- at end of stream
java.io.IOException
long readMQUINT32() throws java.io.IOException
java.io.EOFException
- at end of stream
java.io.IOException
long readLong() throws java.io.IOException
java.io.EOFException
- at end of stream
java.io.IOException
DataInput.readLong()
long readMQINT64() throws java.io.IOException
java.io.EOFException
- at end of stream
java.io.IOException
java.math.BigInteger readMQUINT64() throws java.io.IOException
java.io.EOFException
- at end of stream
java.io.IOException
float readFloat() throws java.io.IOException
java.io.EOFException
- at end of stream
java.io.IOException
DataInput.readFloat()
double readDouble() throws java.io.IOException
java.io.EOFException
- at end of stream
java.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 read
java.io.EOFException
- at end of stream
java.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 stream
java.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 stream
java.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 stream
java.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()
|
IBM WebSphere Application ServerTM Release 8 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |