类 GenericProtobufJsonObjectInput
- java.lang.Object
-
- org.apache.dubbo.common.serialize.protobuf.support.GenericProtobufJsonObjectInput
-
- 所有已实现的接口:
DataInput,ObjectInput
public class GenericProtobufJsonObjectInput extends Object implements ObjectInput
GenericGoogleProtobuf object input implementation
-
-
构造器概要
构造器 构造器 说明 GenericProtobufJsonObjectInput(InputStream in)
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 Map<String,Object>readAttachments()FIXME, only supports transmission of String values.booleanreadBool()Read boolean.bytereadByte()Read byte.byte[]readBytes()Read byte array.doublereadDouble()Read double.ObjectreadEvent()floatreadFloat()Read float.intreadInt()Read integer.longreadLong()Read long.ObjectreadObject()Consider useObjectInput.readObject(Class)orObjectInput.readObject(Class, Type)where possible<T> TreadObject(Class<T> cls)read object<T> TreadObject(Class<T> cls, Type type)read objectshortreadShort()Read short integer.ThrowablereadThrowable()The following methods are customized for the requirement of Dubbo's RPC protocol implementation.StringreadUTF()Read UTF-8 string.
-
-
-
构造器详细资料
-
GenericProtobufJsonObjectInput
public GenericProtobufJsonObjectInput(InputStream in)
-
-
方法详细资料
-
readBool
public boolean readBool() throws IOException从接口复制的说明:DataInputRead boolean.- 指定者:
readBool在接口中DataInput- 返回:
- boolean.
- 抛出:
IOException
-
readByte
public byte readByte() throws IOException从接口复制的说明:DataInputRead byte.- 指定者:
readByte在接口中DataInput- 返回:
- byte value.
- 抛出:
IOException
-
readShort
public short readShort() throws IOException从接口复制的说明:DataInputRead short integer.- 指定者:
readShort在接口中DataInput- 返回:
- short.
- 抛出:
IOException
-
readInt
public int readInt() throws IOException从接口复制的说明:DataInputRead integer.- 指定者:
readInt在接口中DataInput- 返回:
- integer.
- 抛出:
IOException
-
readLong
public long readLong() throws IOException从接口复制的说明:DataInputRead long.- 指定者:
readLong在接口中DataInput- 返回:
- long.
- 抛出:
IOException
-
readFloat
public float readFloat() throws IOException从接口复制的说明:DataInputRead float.- 指定者:
readFloat在接口中DataInput- 返回:
- float.
- 抛出:
IOException
-
readDouble
public double readDouble() throws IOException从接口复制的说明:DataInputRead double.- 指定者:
readDouble在接口中DataInput- 返回:
- double.
- 抛出:
IOException
-
readUTF
public String readUTF() throws IOException
从接口复制的说明:DataInputRead UTF-8 string.- 指定者:
readUTF在接口中DataInput- 返回:
- string.
- 抛出:
IOException
-
readBytes
public byte[] readBytes() throws IOException从接口复制的说明:DataInputRead byte array.- 指定者:
readBytes在接口中DataInput- 返回:
- byte array.
- 抛出:
IOException
-
readObject
public Object readObject()
从接口复制的说明:ObjectInputConsider useObjectInput.readObject(Class)orObjectInput.readObject(Class, Type)where possible- 指定者:
readObject在接口中ObjectInput- 返回:
- object
-
readObject
public <T> T readObject(Class<T> cls) throws IOException
从接口复制的说明:ObjectInputread object- 指定者:
readObject在接口中ObjectInput- 参数:
cls- object class- 返回:
- object
- 抛出:
IOException- if an I/O error occurs
-
readObject
public <T> T readObject(Class<T> cls, Type type) throws IOException
从接口复制的说明:ObjectInputread object- 指定者:
readObject在接口中ObjectInput- 参数:
cls- object classtype- object type- 返回:
- object
- 抛出:
IOException- if an I/O error occurs
-
readThrowable
public Throwable readThrowable() throws IOException
从接口复制的说明:ObjectInputThe following methods are customized for the requirement of Dubbo's RPC protocol implementation. Legacy protocol implementation will try to write Map, Throwable and Null value directly to the stream, which does not meet the restrictions of all serialization protocols.See how ProtobufSerialization, KryoSerialization implemented these methods for more details.
The binding of RPC protocol and biz serialization protocol is not a good practice. Encoding of RPC protocol should be highly independent and portable, easy to cross platforms and languages, for example, like the http headers, restricting the content of headers / attachments to Ascii strings and uses ISO_8859_1 to encode them. https://tools.ietf.org/html/rfc7540#section-8.1.2
- 指定者:
readThrowable在接口中ObjectInput- 抛出:
IOException
-
readAttachments
public Map<String,Object> readAttachments() throws IOException, ClassNotFoundException
FIXME, only supports transmission of String values.- 指定者:
readAttachments在接口中ObjectInput- 返回:
- 抛出:
IOExceptionClassNotFoundException
-
readEvent
public Object readEvent() throws IOException, ClassNotFoundException
- 指定者:
readEvent在接口中ObjectInput- 抛出:
IOExceptionClassNotFoundException
-
-