类 KryoObjectOutput2
- java.lang.Object
-
- org.apache.dubbo.common.serialize.kryo.optimized.KryoObjectOutput2
-
- 所有已实现的接口:
Cleanable,DataOutput,ObjectOutput
public class KryoObjectOutput2 extends Object implements ObjectOutput, Cleanable
Kryo object output implementation, kryo object can be clean
-
-
构造器概要
构造器 构造器 说明 KryoObjectOutput2(OutputStream outputStream)
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 voidcleanup()Implementations must implement this cleanup methodvoidflushBuffer()Flush buffer.voidwriteBool(boolean v)Write boolean.voidwriteByte(byte v)Write byte.voidwriteBytes(byte[] v)Write byte array.voidwriteBytes(byte[] v, int off, int len)Write byte array.voidwriteDouble(double v)Write double.voidwriteFloat(float v)Write float.voidwriteInt(int v)Write integer.voidwriteLong(long v)Write long.voidwriteObject(Object v)write object.voidwriteShort(short v)Write short.voidwriteThrowable(Object v)The following methods are customized for the requirement of Dubbo's RPC protocol implementation.voidwriteUTF(String v)Write string.-
从接口继承的方法 org.apache.dubbo.common.serialize.ObjectOutput
writeAttachments, writeEvent
-
-
-
-
构造器详细资料
-
KryoObjectOutput2
public KryoObjectOutput2(OutputStream outputStream)
-
-
方法详细资料
-
writeBool
public void writeBool(boolean v) throws IOException从接口复制的说明:DataOutputWrite boolean.- 指定者:
writeBool在接口中DataOutput- 参数:
v- value.- 抛出:
IOException
-
writeByte
public void writeByte(byte v) throws IOException从接口复制的说明:DataOutputWrite byte.- 指定者:
writeByte在接口中DataOutput- 参数:
v- value.- 抛出:
IOException
-
writeShort
public void writeShort(short v) throws IOException从接口复制的说明:DataOutputWrite short.- 指定者:
writeShort在接口中DataOutput- 参数:
v- value.- 抛出:
IOException
-
writeInt
public void writeInt(int v) throws IOException从接口复制的说明:DataOutputWrite integer.- 指定者:
writeInt在接口中DataOutput- 参数:
v- value.- 抛出:
IOException
-
writeLong
public void writeLong(long v) throws IOException从接口复制的说明:DataOutputWrite long.- 指定者:
writeLong在接口中DataOutput- 参数:
v- value.- 抛出:
IOException
-
writeFloat
public void writeFloat(float v) throws IOException从接口复制的说明:DataOutputWrite float.- 指定者:
writeFloat在接口中DataOutput- 参数:
v- value.- 抛出:
IOException
-
writeDouble
public void writeDouble(double v) throws IOException从接口复制的说明:DataOutputWrite double.- 指定者:
writeDouble在接口中DataOutput- 参数:
v- value.- 抛出:
IOException
-
writeBytes
public void writeBytes(byte[] v) throws IOException从接口复制的说明:DataOutputWrite byte array.- 指定者:
writeBytes在接口中DataOutput- 参数:
v- value.- 抛出:
IOException
-
writeBytes
public void writeBytes(byte[] v, int off, int len) throws IOException从接口复制的说明:DataOutputWrite byte array.- 指定者:
writeBytes在接口中DataOutput- 参数:
v- value.off- the start offset in the data.len- the number of bytes that are written.- 抛出:
IOException
-
writeUTF
public void writeUTF(String v) throws IOException
从接口复制的说明:DataOutputWrite string.- 指定者:
writeUTF在接口中DataOutput- 参数:
v- value.- 抛出:
IOException
-
writeObject
public void writeObject(Object v) throws IOException
从接口复制的说明:ObjectOutputwrite object.- 指定者:
writeObject在接口中ObjectOutput- 参数:
v- object.- 抛出:
IOException
-
writeThrowable
public void writeThrowable(Object v) throws IOException
从接口复制的说明:ObjectOutputThe 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
- 指定者:
writeThrowable在接口中ObjectOutput- 抛出:
IOException
-
flushBuffer
public void flushBuffer() throws IOException从接口复制的说明:DataOutputFlush buffer.- 指定者:
flushBuffer在接口中DataOutput- 抛出:
IOException
-
-