com.alibaba.dubbo.common.serialize.support.dubbo
Class GenericDataInput

java.lang.Object
  extended by com.alibaba.dubbo.common.serialize.support.dubbo.GenericDataInput
All Implemented Interfaces:
DataInput, GenericDataFlags
Direct Known Subclasses:
GenericObjectInput

public class GenericDataInput
extends Object
implements DataInput, GenericDataFlags

Default DataInput impl. Not thread-safe.

Author:
qian.lei

Field Summary
 
Fields inherited from interface com.alibaba.dubbo.common.serialize.support.dubbo.GenericDataFlags
OBJECT, OBJECT_BYTES, OBJECT_DESC, OBJECT_DESC_ID, OBJECT_DUMMY, OBJECT_MAP, OBJECT_NULL, OBJECT_REF, OBJECT_STREAM, OBJECT_VALUE, OBJECT_VALUES, VARINT, VARINT_0, VARINT_1, VARINT_10, VARINT_11, VARINT_12, VARINT_13, VARINT_14, VARINT_15, VARINT_16, VARINT_17, VARINT_18, VARINT_19, VARINT_1A, VARINT_1B, VARINT_1C, VARINT_1D, VARINT_1E, VARINT_1F, VARINT_2, VARINT_3, VARINT_4, VARINT_5, VARINT_6, VARINT_7, VARINT_8, VARINT_9, VARINT_A, VARINT_B, VARINT_C, VARINT_D, VARINT_E, VARINT_F, VARINT_N1, VARINT_N2, VARINT_N3, VARINT_N4, VARINT_N5, VARINT_N6, VARINT_N7, VARINT_N8, VARINT_N9, VARINT_NA, VARINT_NB, VARINT_NC, VARINT_ND, VARINT_NE, VARINT_NF, VARINT16, VARINT24, VARINT32, VARINT40, VARINT48, VARINT56, VARINT64, VARINT8
 
Constructor Summary
GenericDataInput(InputStream is)
           
GenericDataInput(InputStream is, int buffSize)
           
 
Method Summary
 boolean readBool()
          Read boolean.
 byte readByte()
          Read byte.
 byte[] readBytes()
          Read byte array.
 double readDouble()
          Read double.
 float readFloat()
          Read float.
 int readInt()
          Read integer.
 long readLong()
          Read long.
 short readShort()
          Read short integer.
 int readUInt()
           
 String readUTF()
          Read UTF-8 string.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GenericDataInput

public GenericDataInput(InputStream is)

GenericDataInput

public GenericDataInput(InputStream is,
                        int buffSize)
Method Detail

readBool

public boolean readBool()
                 throws IOException
Description copied from interface: DataInput
Read boolean.

Specified by:
readBool in interface DataInput
Returns:
boolean.
Throws:
IOException

readByte

public byte readByte()
              throws IOException
Description copied from interface: DataInput
Read byte.

Specified by:
readByte in interface DataInput
Returns:
byte value.
Throws:
IOException

readShort

public short readShort()
                throws IOException
Description copied from interface: DataInput
Read short integer.

Specified by:
readShort in interface DataInput
Returns:
short.
Throws:
IOException

readInt

public int readInt()
            throws IOException
Description copied from interface: DataInput
Read integer.

Specified by:
readInt in interface DataInput
Returns:
integer.
Throws:
IOException

readLong

public long readLong()
              throws IOException
Description copied from interface: DataInput
Read long.

Specified by:
readLong in interface DataInput
Returns:
long.
Throws:
IOException

readFloat

public float readFloat()
                throws IOException
Description copied from interface: DataInput
Read float.

Specified by:
readFloat in interface DataInput
Returns:
float.
Throws:
IOException

readDouble

public double readDouble()
                  throws IOException
Description copied from interface: DataInput
Read double.

Specified by:
readDouble in interface DataInput
Returns:
double.
Throws:
IOException

readUTF

public String readUTF()
               throws IOException
Description copied from interface: DataInput
Read UTF-8 string.

Specified by:
readUTF in interface DataInput
Returns:
string.
Throws:
IOException

readBytes

public byte[] readBytes()
                 throws IOException
Description copied from interface: DataInput
Read byte array.

Specified by:
readBytes in interface DataInput
Returns:
byte array.
Throws:
IOException

readUInt

public int readUInt()
             throws IOException
Throws:
IOException


Copyright © 2012–2017 Alibaba. All rights reserved.