|
IBM WebSphere Application ServerTM Release 8 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.InputStream
java.io.FilterInputStream
com.ibm.mq.data.MQDataInputStream
public class MQDataInputStream
Provides an InputStream implementation of MQDataInput. To use, wrap a source InputStream in the MQDataInputStream. Subsequent direct access to the source InputStream should be discouraged, as it will result in undefined behaviour from the MQDataInputStream.
Field Summary | |
---|---|
static java.lang.String |
COPYRIGHT
|
Fields inherited from class java.io.FilterInputStream |
---|
in |
Constructor Summary | |
---|---|
MQDataInputStream(java.io.InputStream in)
|
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. |
void |
mark(int readLimit)
|
int |
read()
|
int |
read(byte[] b)
|
int |
read(byte[] b,
int off,
int len)
|
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 |
reset()
|
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. |
long |
skip(long n)
|
int |
skipBytes(int n)
Attempts to skip over a number of bytes, returning the number of bytes actually skipped. |
Methods inherited from class java.io.FilterInputStream |
---|
available, close, markSupported |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String COPYRIGHT
Constructor Detail |
---|
public MQDataInputStream(java.io.InputStream in)
Method Detail |
---|
public void setCCSID(int ccsid) throws java.io.IOException
MQDataInput
setCCSID
in interface MQDataInput
ccsid
- new CCSID value
java.io.IOException
public int getCCSID() throws java.io.IOException
MQDataInput
getCCSID
in interface MQDataInput
java.io.IOException
public void setIntegerEncoding(IntegerEncoding ie) throws java.io.IOException
MQDataInput
setIntegerEncoding
in interface MQDataInput
ie
- new integer encoding value
java.io.IOException
IntegerEncoding
public IntegerEncoding getIntegerEncoding() throws java.io.IOException
MQDataInput
getIntegerEncoding
in interface MQDataInput
java.io.IOException
IntegerEncoding
public void setFloatEncoding(FloatEncoding fe) throws java.io.IOException
MQDataInput
setFloatEncoding
in interface MQDataInput
fe
- new floating-point encoding value
java.io.IOException
FloatEncoding
public FloatEncoding getFloatEncoding() throws java.io.IOException
MQDataInput
getFloatEncoding
in interface MQDataInput
java.io.IOException
FloatEncoding
public void setDecimalEncoding(DecimalEncoding de) throws java.io.IOException
MQDataInput
setDecimalEncoding
in interface MQDataInput
de
- new packed-decimal encoding value
java.io.IOException
DecimalEncoding
public DecimalEncoding getDecimalEncoding() throws java.io.IOException
MQDataInput
getDecimalEncoding
in interface MQDataInput
java.io.IOException
DecimalEncoding
public void setEncoding(int encoding) throws java.io.IOException
MQDataInput
setEncoding
in interface MQDataInput
encoding
- integer representation of the new encoding
java.io.IOException
public int getEncoding() throws java.io.IOException
MQDataInput
getEncoding
in interface MQDataInput
java.io.IOException
public void mark(int readLimit)
mark
in class java.io.FilterInputStream
public void reset() throws java.io.IOException
reset
in class java.io.FilterInputStream
java.io.IOException
public int getDataOffset() throws java.io.IOException
MQDataInput
getDataOffset
in interface MQDataInput
java.io.IOException
public long skip(long n) throws java.io.IOException
skip
in class java.io.FilterInputStream
java.io.IOException
public int skipBytes(int n) throws java.io.IOException
MQDataInput
skipBytes
in interface MQDataInput
n
- number of bytes to attempt to skip
java.io.IOException
DataInput.skipBytes(int)
public int read() throws java.io.IOException
read
in class java.io.FilterInputStream
java.io.IOException
public int read(byte[] b) throws java.io.IOException
read
in class java.io.FilterInputStream
java.io.IOException
public int read(byte[] b, int off, int len) throws java.io.IOException
read
in class java.io.FilterInputStream
java.io.IOException
public byte readByte() throws java.io.IOException
MQDataInput
readByte
in interface MQDataInput
java.io.EOFException
- if at the end of the stream
java.io.IOException
public byte[] readBytes(int length) throws java.io.IOException
MQDataInput
readBytes
in interface MQDataInput
length
- number of bytes to read
java.io.EOFException
- if at the end of the stream
java.io.IOException
public byte readMQBYTE() throws java.io.IOException
MQDataInput
readMQBYTE
in interface MQDataInput
java.io.EOFException
- if at the end of the stream
java.io.IOException
public byte[] readMQBYTE(int length) throws java.io.IOException
MQDataInput
readMQBYTE
in interface MQDataInput
length
- number of bytes to read
java.io.EOFException
- if at the end of the stream
java.io.IOException
public byte[] readMQBYTE8() throws java.io.IOException
MQDataInput
readMQBYTE8
in interface MQDataInput
java.io.EOFException
- if at the end of the stream
java.io.IOException
public byte[] readMQBYTE16() throws java.io.IOException
MQDataInput
readMQBYTE16
in interface MQDataInput
java.io.EOFException
- if at the end of the stream
java.io.IOException
public byte[] readMQBYTE24() throws java.io.IOException
MQDataInput
readMQBYTE24
in interface MQDataInput
java.io.EOFException
- if at the end of the stream
java.io.IOException
public byte[] readMQBYTE32() throws java.io.IOException
MQDataInput
readMQBYTE32
in interface MQDataInput
java.io.EOFException
- if at the end of the stream
java.io.IOException
public void readFully(byte[] b) throws java.io.IOException
MQDataInput
readFully
in interface MQDataInput
b
- byte array to read into
java.io.EOFException
- if the stream does not have enough data left to
fill the byte array
java.io.IOException
DataInput.readFully(byte[])
public void readFully(byte[] b, int off, int len) throws java.io.IOException
MQDataInput
readFully
in interface MQDataInput
b
- byte array to read intooff
- starting index in the byte arraylen
- number of bytes to read
java.io.EOFException
- if the stream ends before len bytes have been read
java.io.IOException
DataInput.readFully(byte[], int, int)
public char readMQCHAR() throws java.io.IOException
MQDataInput
readMQCHAR
in interface MQDataInput
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.public java.lang.String readMQCHAR(int length) throws java.io.IOException
MQDataInput
readMQCHAR
in interface MQDataInput
length
- number of bytes to read
java.nio.charset.CharacterCodingException
- if conversion fails
java.io.EOFException
- at end of stream
java.io.IOException
public java.lang.String readMQCHAR4() throws java.io.IOException
MQDataInput
readMQCHAR4
in interface MQDataInput
java.nio.charset.CharacterCodingException
- if conversion fails
java.io.EOFException
- at end of stream
java.io.IOException
public java.lang.String readMQCHAR8() throws java.io.IOException
MQDataInput
readMQCHAR8
in interface MQDataInput
java.nio.charset.CharacterCodingException
- if conversion fails
java.io.EOFException
- at end of stream
java.io.IOException
public java.lang.String readMQCHAR12() throws java.io.IOException
MQDataInput
readMQCHAR12
in interface MQDataInput
java.nio.charset.CharacterCodingException
- if conversion fails
java.io.EOFException
- at end of stream
java.io.IOException
public java.lang.String readMQCHAR16() throws java.io.IOException
MQDataInput
readMQCHAR16
in interface MQDataInput
java.nio.charset.CharacterCodingException
- if conversion fails
java.io.EOFException
- at end of stream
java.io.IOException
public java.lang.String readMQCHAR20() throws java.io.IOException
MQDataInput
readMQCHAR20
in interface MQDataInput
java.nio.charset.CharacterCodingException
- if conversion fails
java.io.EOFException
- at end of stream
java.io.IOException
public java.lang.String readMQCHAR24() throws java.io.IOException
MQDataInput
readMQCHAR24
in interface MQDataInput
java.nio.charset.CharacterCodingException
- if conversion fails
java.io.EOFException
- at end of stream
java.io.IOException
public java.lang.String readMQCHAR28() throws java.io.IOException
MQDataInput
readMQCHAR28
in interface MQDataInput
java.nio.charset.CharacterCodingException
- if conversion fails
java.io.EOFException
- at end of stream
java.io.IOException
public java.lang.String readMQCHAR32() throws java.io.IOException
MQDataInput
readMQCHAR32
in interface MQDataInput
java.nio.charset.CharacterCodingException
- if conversion fails
java.io.EOFException
- at end of stream
java.io.IOException
public java.lang.String readMQCHAR48() throws java.io.IOException
MQDataInput
readMQCHAR48
in interface MQDataInput
java.nio.charset.CharacterCodingException
- if conversion fails
java.io.EOFException
- at end of stream
java.io.IOException
public java.lang.String readMQCHAR64() throws java.io.IOException
MQDataInput
readMQCHAR64
in interface MQDataInput
java.nio.charset.CharacterCodingException
- if conversion fails
java.io.EOFException
- at end of stream
java.io.IOException
public java.lang.String readMQCHAR128() throws java.io.IOException
MQDataInput
readMQCHAR128
in interface MQDataInput
java.nio.charset.CharacterCodingException
- if conversion fails
java.io.EOFException
- at end of stream
java.io.IOException
public java.lang.String readMQCHAR256() throws java.io.IOException
MQDataInput
readMQCHAR256
in interface MQDataInput
java.nio.charset.CharacterCodingException
- if conversion fails
java.io.EOFException
- at end of stream
java.io.IOException
public char readUCS2Char() throws java.io.IOException
MQDataInput
readUCS2Char
in interface MQDataInput
java.io.EOFException
- at end of stream
java.io.IOException
public java.lang.String readUTF() throws java.io.IOException
MQDataInput
readUTF
in interface MQDataInput
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()
public short readShort() throws java.io.IOException
MQDataInput
readShort
in interface MQDataInput
java.io.EOFException
- at end of stream
java.io.IOException
DataInput.readShort()
public short readMQSHORT() throws java.io.IOException
MQDataInput
readMQSHORT
in interface MQDataInput
java.io.EOFException
- at end of stream
java.io.IOException
public int readMQUSHORT() throws java.io.IOException
MQDataInput
readMQUSHORT
in interface MQDataInput
java.io.EOFException
- at end of stream
java.io.IOException
public int readInt() throws java.io.IOException
MQDataInput
readInt
in interface MQDataInput
java.io.EOFException
- at end of stream
java.io.IOException
DataInput.readInt()
public int readMQLONG() throws java.io.IOException
MQDataInput
readMQLONG
in interface MQDataInput
java.io.EOFException
- at end of stream
java.io.IOException
public long readMQULONG() throws java.io.IOException
MQDataInput
readMQULONG
in interface MQDataInput
java.io.EOFException
- at end of stream
java.io.IOException
public int readMQINT32() throws java.io.IOException
MQDataInput
readMQINT32
in interface MQDataInput
java.io.EOFException
- at end of stream
java.io.IOException
public long readMQUINT32() throws java.io.IOException
MQDataInput
readMQUINT32
in interface MQDataInput
java.io.EOFException
- at end of stream
java.io.IOException
public long readLong() throws java.io.IOException
MQDataInput
readLong
in interface MQDataInput
java.io.EOFException
- at end of stream
java.io.IOException
DataInput.readLong()
public long readMQINT64() throws java.io.IOException
MQDataInput
readMQINT64
in interface MQDataInput
java.io.EOFException
- at end of stream
java.io.IOException
public java.math.BigInteger readMQUINT64() throws java.io.IOException
MQDataInput
readMQUINT64
in interface MQDataInput
java.io.EOFException
- at end of stream
java.io.IOException
public float readFloat() throws java.io.IOException
MQDataInput
readFloat
in interface MQDataInput
java.io.EOFException
- at end of stream
java.io.IOException
DataInput.readFloat()
public double readDouble() throws java.io.IOException
MQDataInput
readDouble
in interface MQDataInput
java.io.EOFException
- at end of stream
java.io.IOException
DataInput.readFloat()
public java.math.BigInteger readDecimal(int length) throws java.io.IOException
MQDataInput
Unsigned packed-decimals are treated as positive; this method cannot distinguish between positive and negative zero.
readDecimal
in interface MQDataInput
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.public short readDecimal2() throws java.io.IOException
MQDataInput
Unsigned packed-decimals are treated as positive; this method cannot distinguish between positive and negative zero.
readDecimal2
in interface MQDataInput
java.io.EOFException
- at end of stream
java.io.IOException
- if a malformed packed-decimal is encountered, or for other error.public int readDecimal4() throws java.io.IOException
MQDataInput
Unsigned packed-decimals are treated as positive; this method cannot distinguish between positive and negative zero.
readDecimal4
in interface MQDataInput
java.io.EOFException
- at end of stream
java.io.IOException
- if a malformed packed-decimal is encountered, or for other error.public long readDecimal8() throws java.io.IOException
MQDataInput
Unsigned packed-decimals are treated as positive; this method cannot distinguish between positive and negative zero.
readDecimal8
in interface MQDataInput
java.io.EOFException
- at end of stream
java.io.IOException
- if a malformed packed-decimal is encountered, or for other error.public java.lang.Object readObject() throws java.io.IOException, java.lang.ClassNotFoundException
MQDataInput
readObject
in interface MQDataInput
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 |