Package org.infinispan.protostream.impl
Class TagWriterImpl
java.lang.Object
org.infinispan.protostream.impl.TagWriterImpl
- All Implemented Interfaces:
ProtobufTagMarshaller.OperationContext
,ProtobufTagMarshaller.WriteContext
,RawProtoStreamWriter
,TagWriter
public final class TagWriterImpl
extends Object
implements TagWriter, ProtobufTagMarshaller.WriteContext
- Since:
- 3.0
- Author:
- [email protected]
-
Method Summary
Modifier and TypeMethodDescriptionvoid
flush()
org.infinispan.protostream.impl.ProtoStreamWriterImpl
Deprecated.Provides access to theImmutableSerializationContext
.int
static TagWriterImpl
static TagWriterImpl
newInstance
(ImmutableSerializationContext serCtx, byte[] buf) static TagWriterImpl
newInstance
(ImmutableSerializationContext serCtx, byte[] buf, int offset, int length) static TagWriterImpl
newInstance
(ImmutableSerializationContext serCtx, OutputStream output) static TagWriterImpl
newInstance
(ImmutableSerializationContext serCtx, OutputStream output, int bufferSize) static TagWriterImpl
newInstance
(ImmutableSerializationContext serCtx, ByteBuffer byteBuffer) static TagWriterImpl
static TagWriterImpl
newNestedInstance
(ProtobufTagMarshaller.WriteContext parent, byte[] buf) static TagWriterImpl
newNestedInstance
(ProtobufTagMarshaller.WriteContext parent, OutputStream output) void
void
writeBool
(int number, boolean value) void
writeBytes
(int number, byte[] value) void
writeBytes
(int number, byte[] value, int offset, int length) void
writeBytes
(int number, ByteBuffer value) Write field tag and all remaining bytes from current buffer position.void
writeDouble
(int number, double value) void
writeEnum
(int number, int value) void
writeFixed32
(int number, int value) void
writeFixed64
(int number, long value) void
writeFloat
(int number, float value) void
writeInt32
(int number, int value) void
writeInt64
(int number, long value) void
writeRawByte
(byte value) void
writeRawBytes
(byte[] value, int offset, int length) void
writeRawBytes
(ByteBuffer value) Write all remaining bytes from current buffer position.void
writeSFixed32
(int number, int value) void
writeSFixed64
(int number, long value) void
writeSInt32
(int number, int value) void
writeSInt64
(int number, long value) void
writeString
(int number, String value) void
writeTag
(int number, int wireType) void
void
writeUInt32
(int number, int value) void
writeUInt64
(int number, long value) void
writeVarint32
(int value) void
writeVarint64
(long value) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.infinispan.protostream.RawProtoStreamWriter
writeUInt32NoTag, writeUInt64NoTag
-
Method Details
-
newNestedInstance
public static TagWriterImpl newNestedInstance(ProtobufTagMarshaller.WriteContext parent, OutputStream output) -
newNestedInstance
public static TagWriterImpl newNestedInstance(ProtobufTagMarshaller.WriteContext parent, byte[] buf) -
newInstance
-
newInstance
public static TagWriterImpl newInstance(ImmutableSerializationContext serCtx, OutputStream output, int bufferSize) -
newInstance
-
newInstance
public static TagWriterImpl newInstance(ImmutableSerializationContext serCtx, byte[] buf, int offset, int length) -
newInstance
public static TagWriterImpl newInstance(ImmutableSerializationContext serCtx, ByteBuffer byteBuffer) -
newInstance
-
newInstanceNoBuffer
public static TagWriterImpl newInstanceNoBuffer(ImmutableSerializationContext ctx, OutputStream out) -
getWrittenBytes
public int getWrittenBytes() -
flush
- Specified by:
flush
in interfaceRawProtoStreamWriter
- Specified by:
flush
in interfaceTagWriter
- Throws:
IOException
-
writeTag
- Specified by:
writeTag
in interfaceRawProtoStreamWriter
- Specified by:
writeTag
in interfaceTagWriter
- Throws:
IOException
-
writeTag
- Specified by:
writeTag
in interfaceRawProtoStreamWriter
- Specified by:
writeTag
in interfaceTagWriter
- Throws:
IOException
-
writeVarint32
- Specified by:
writeVarint32
in interfaceRawProtoStreamWriter
- Specified by:
writeVarint32
in interfaceTagWriter
- Throws:
IOException
-
writeVarint64
- Specified by:
writeVarint64
in interfaceRawProtoStreamWriter
- Specified by:
writeVarint64
in interfaceTagWriter
- Throws:
IOException
-
writeString
- Specified by:
writeString
in interfaceRawProtoStreamWriter
- Specified by:
writeString
in interfaceTagWriter
- Throws:
IOException
-
writeInt32
- Specified by:
writeInt32
in interfaceRawProtoStreamWriter
- Specified by:
writeInt32
in interfaceTagWriter
- Throws:
IOException
-
writeUInt32
- Specified by:
writeUInt32
in interfaceRawProtoStreamWriter
- Specified by:
writeUInt32
in interfaceTagWriter
- Throws:
IOException
-
writeSInt32
- Specified by:
writeSInt32
in interfaceRawProtoStreamWriter
- Specified by:
writeSInt32
in interfaceTagWriter
- Throws:
IOException
-
writeFixed32
- Specified by:
writeFixed32
in interfaceRawProtoStreamWriter
- Specified by:
writeFixed32
in interfaceTagWriter
- Throws:
IOException
-
writeSFixed32
- Specified by:
writeSFixed32
in interfaceRawProtoStreamWriter
- Specified by:
writeSFixed32
in interfaceTagWriter
- Throws:
IOException
-
writeInt64
- Specified by:
writeInt64
in interfaceRawProtoStreamWriter
- Specified by:
writeInt64
in interfaceTagWriter
- Throws:
IOException
-
writeUInt64
- Specified by:
writeUInt64
in interfaceRawProtoStreamWriter
- Specified by:
writeUInt64
in interfaceTagWriter
- Throws:
IOException
-
writeSInt64
- Specified by:
writeSInt64
in interfaceRawProtoStreamWriter
- Specified by:
writeSInt64
in interfaceTagWriter
- Throws:
IOException
-
writeFixed64
- Specified by:
writeFixed64
in interfaceRawProtoStreamWriter
- Specified by:
writeFixed64
in interfaceTagWriter
- Throws:
IOException
-
writeSFixed64
- Specified by:
writeSFixed64
in interfaceRawProtoStreamWriter
- Specified by:
writeSFixed64
in interfaceTagWriter
- Throws:
IOException
-
writeEnum
- Specified by:
writeEnum
in interfaceRawProtoStreamWriter
- Specified by:
writeEnum
in interfaceTagWriter
- Throws:
IOException
-
writeBool
- Specified by:
writeBool
in interfaceRawProtoStreamWriter
- Specified by:
writeBool
in interfaceTagWriter
- Throws:
IOException
-
writeDouble
- Specified by:
writeDouble
in interfaceRawProtoStreamWriter
- Specified by:
writeDouble
in interfaceTagWriter
- Throws:
IOException
-
writeFloat
- Specified by:
writeFloat
in interfaceRawProtoStreamWriter
- Specified by:
writeFloat
in interfaceTagWriter
- Throws:
IOException
-
writeBytes
Description copied from interface:RawProtoStreamWriter
Write field tag and all remaining bytes from current buffer position.- Specified by:
writeBytes
in interfaceRawProtoStreamWriter
- Specified by:
writeBytes
in interfaceTagWriter
- Throws:
IOException
-
writeBytes
- Specified by:
writeBytes
in interfaceRawProtoStreamWriter
- Specified by:
writeBytes
in interfaceTagWriter
- Throws:
IOException
-
writeBytes
- Specified by:
writeBytes
in interfaceRawProtoStreamWriter
- Specified by:
writeBytes
in interfaceTagWriter
- Throws:
IOException
-
writeRawByte
- Specified by:
writeRawByte
in interfaceRawProtoStreamWriter
- Throws:
IOException
-
writeRawBytes
- Specified by:
writeRawBytes
in interfaceRawProtoStreamWriter
- Specified by:
writeRawBytes
in interfaceTagWriter
- Throws:
IOException
-
writeRawBytes
Description copied from interface:RawProtoStreamWriter
Write all remaining bytes from current buffer position.- Specified by:
writeRawBytes
in interfaceRawProtoStreamWriter
- Throws:
IOException
-
getSerializationContext
Description copied from interface:ProtobufTagMarshaller.OperationContext
Provides access to theImmutableSerializationContext
.- Specified by:
getSerializationContext
in interfaceProtobufTagMarshaller.OperationContext
-
getParam
- Specified by:
getParam
in interfaceProtobufTagMarshaller.OperationContext
-
setParam
- Specified by:
setParam
in interfaceProtobufTagMarshaller.OperationContext
-
getWriter
- Specified by:
getWriter
in interfaceProtobufTagMarshaller.WriteContext
-
getProtoStreamWriter
Deprecated.this will be removed in 5.0 together withMessageMarshaller
-
MessageMarshaller