com.alibaba.dubbo.common.serialize.support.nativejava
Class NativeJavaObjectInput

java.lang.Object
  extended by com.alibaba.dubbo.common.serialize.support.nativejava.NativeJavaObjectInput
All Implemented Interfaces:
DataInput, ObjectInput
Direct Known Subclasses:
JavaObjectInput

public class NativeJavaObjectInput
extends Object
implements ObjectInput

Author:
kimi

Constructor Summary
NativeJavaObjectInput(InputStream is)
           
 
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.
 Object readObject()
          read object.
<T> T
readObject(Class<T> cls)
          read object.
<T> T
readObject(Class<T> cls, Type type)
          read object.
 short readShort()
          Read short integer.
 String readUTF()
          Read UTF-8 string.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NativeJavaObjectInput

public NativeJavaObjectInput(InputStream is)
                      throws IOException
Throws:
IOException
Method Detail

readObject

public Object readObject()
                  throws IOException,
                         ClassNotFoundException
Description copied from interface: ObjectInput
read object.

Specified by:
readObject in interface ObjectInput
Returns:
object.
Throws:
IOException
ClassNotFoundException

readObject

public <T> T readObject(Class<T> cls)
             throws IOException,
                    ClassNotFoundException
Description copied from interface: ObjectInput
read object.

Specified by:
readObject in interface ObjectInput
Parameters:
cls - object type.
Returns:
object.
Throws:
IOException
ClassNotFoundException

readObject

public <T> T readObject(Class<T> cls,
                        Type type)
             throws IOException,
                    ClassNotFoundException
Description copied from interface: ObjectInput
read object.

Specified by:
readObject in interface ObjectInput
Parameters:
cls - object type.
Returns:
object.
Throws:
IOException
ClassNotFoundException

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


Copyright © 2012–2017 Alibaba. All rights reserved.