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:
- anistor@redhat.com
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description intdepth()voidflush()ObjectgetParam(Object key)org.infinispan.protostream.impl.ProtoStreamWriterImplgetProtoStreamWriter()Deprecated.this will be removed in 5.0 together withMessageMarshallerSerializationContextImplgetSerializationContext()Provides access to theImmutableSerializationContext.TagWritergetWriter()intgetWrittenBytes()static TagWriterImplnewInstance(ImmutableSerializationContext serCtx)static TagWriterImplnewInstance(ImmutableSerializationContext serCtx, byte[] buf)static TagWriterImplnewInstance(ImmutableSerializationContext serCtx, byte[] buf, int offset, int length)static TagWriterImplnewInstance(ImmutableSerializationContext serCtx, OutputStream output)static TagWriterImplnewInstance(ImmutableSerializationContext serCtx, OutputStream output, int bufferSize)static TagWriterImplnewInstance(ImmutableSerializationContext serCtx, ByteBuffer byteBuffer)static TagWriterImplnewInstanceNoBuffer(ImmutableSerializationContext ctx, OutputStream out)static TagWriterImplnewNestedInstance(ProtobufTagMarshaller.WriteContext parent, byte[] buf)static TagWriterImplnewNestedInstance(ProtobufTagMarshaller.WriteContext parent, OutputStream output)voidsetParam(Object key, Object value)voidwriteBool(int number, boolean value)voidwriteBytes(int number, byte[] value)voidwriteBytes(int number, byte[] value, int offset, int length)voidwriteBytes(int number, ByteBuffer value)Write field tag and all remaining bytes from current buffer position.voidwriteDouble(int number, double value)voidwriteEnum(int number, int value)voidwriteFixed32(int number, int value)voidwriteFixed64(int number, long value)voidwriteFloat(int number, float value)voidwriteInt32(int number, int value)voidwriteInt64(int number, long value)voidwriteRawByte(byte value)voidwriteRawBytes(byte[] value, int offset, int length)voidwriteRawBytes(ByteBuffer value)Write all remaining bytes from current buffer position.voidwriteSFixed32(int number, int value)voidwriteSFixed64(int number, long value)voidwriteSInt32(int number, int value)voidwriteSInt64(int number, long value)voidwriteString(int number, String value)voidwriteTag(int number, int wireType)voidwriteTag(int number, WireType wireType)voidwriteUInt32(int number, int value)voidwriteUInt64(int number, long value)voidwriteVarint32(int value)voidwriteVarint64(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 Detail
-
newNestedInstance
public static TagWriterImpl newNestedInstance(ProtobufTagMarshaller.WriteContext parent, OutputStream output)
-
newNestedInstance
public static TagWriterImpl newNestedInstance(ProtobufTagMarshaller.WriteContext parent, byte[] buf)
-
newInstance
public static TagWriterImpl newInstance(ImmutableSerializationContext serCtx, OutputStream output)
-
newInstance
public static TagWriterImpl newInstance(ImmutableSerializationContext serCtx, OutputStream output, int bufferSize)
-
newInstance
public static TagWriterImpl newInstance(ImmutableSerializationContext serCtx, byte[] buf)
-
newInstance
public static TagWriterImpl newInstance(ImmutableSerializationContext serCtx, byte[] buf, int offset, int length)
-
newInstance
public static TagWriterImpl newInstance(ImmutableSerializationContext serCtx, ByteBuffer byteBuffer)
-
newInstance
public static TagWriterImpl newInstance(ImmutableSerializationContext serCtx)
-
newInstanceNoBuffer
public static TagWriterImpl newInstanceNoBuffer(ImmutableSerializationContext ctx, OutputStream out)
-
getWrittenBytes
public int getWrittenBytes()
-
flush
public void flush() throws IOException- Specified by:
flushin interfaceRawProtoStreamWriter- Specified by:
flushin interfaceTagWriter- Throws:
IOException
-
writeTag
public void writeTag(int number, int wireType) throws IOException- Specified by:
writeTagin interfaceRawProtoStreamWriter- Specified by:
writeTagin interfaceTagWriter- Throws:
IOException
-
writeTag
public void writeTag(int number, WireType wireType) throws IOException- Specified by:
writeTagin interfaceRawProtoStreamWriter- Specified by:
writeTagin interfaceTagWriter- Throws:
IOException
-
writeVarint32
public void writeVarint32(int value) throws IOException- Specified by:
writeVarint32in interfaceRawProtoStreamWriter- Specified by:
writeVarint32in interfaceTagWriter- Throws:
IOException
-
writeVarint64
public void writeVarint64(long value) throws IOException- Specified by:
writeVarint64in interfaceRawProtoStreamWriter- Specified by:
writeVarint64in interfaceTagWriter- Throws:
IOException
-
writeString
public void writeString(int number, String value) throws IOException- Specified by:
writeStringin interfaceRawProtoStreamWriter- Specified by:
writeStringin interfaceTagWriter- Throws:
IOException
-
writeInt32
public void writeInt32(int number, int value) throws IOException- Specified by:
writeInt32in interfaceRawProtoStreamWriter- Specified by:
writeInt32in interfaceTagWriter- Throws:
IOException
-
writeUInt32
public void writeUInt32(int number, int value) throws IOException- Specified by:
writeUInt32in interfaceRawProtoStreamWriter- Specified by:
writeUInt32in interfaceTagWriter- Throws:
IOException
-
writeSInt32
public void writeSInt32(int number, int value) throws IOException- Specified by:
writeSInt32in interfaceRawProtoStreamWriter- Specified by:
writeSInt32in interfaceTagWriter- Throws:
IOException
-
writeFixed32
public void writeFixed32(int number, int value) throws IOException- Specified by:
writeFixed32in interfaceRawProtoStreamWriter- Specified by:
writeFixed32in interfaceTagWriter- Throws:
IOException
-
writeSFixed32
public void writeSFixed32(int number, int value) throws IOException- Specified by:
writeSFixed32in interfaceRawProtoStreamWriter- Specified by:
writeSFixed32in interfaceTagWriter- Throws:
IOException
-
writeInt64
public void writeInt64(int number, long value) throws IOException- Specified by:
writeInt64in interfaceRawProtoStreamWriter- Specified by:
writeInt64in interfaceTagWriter- Throws:
IOException
-
writeUInt64
public void writeUInt64(int number, long value) throws IOException- Specified by:
writeUInt64in interfaceRawProtoStreamWriter- Specified by:
writeUInt64in interfaceTagWriter- Throws:
IOException
-
writeSInt64
public void writeSInt64(int number, long value) throws IOException- Specified by:
writeSInt64in interfaceRawProtoStreamWriter- Specified by:
writeSInt64in interfaceTagWriter- Throws:
IOException
-
writeFixed64
public void writeFixed64(int number, long value) throws IOException- Specified by:
writeFixed64in interfaceRawProtoStreamWriter- Specified by:
writeFixed64in interfaceTagWriter- Throws:
IOException
-
writeSFixed64
public void writeSFixed64(int number, long value) throws IOException- Specified by:
writeSFixed64in interfaceRawProtoStreamWriter- Specified by:
writeSFixed64in interfaceTagWriter- Throws:
IOException
-
writeEnum
public void writeEnum(int number, int value) throws IOException- Specified by:
writeEnumin interfaceRawProtoStreamWriter- Specified by:
writeEnumin interfaceTagWriter- Throws:
IOException
-
writeBool
public void writeBool(int number, boolean value) throws IOException- Specified by:
writeBoolin interfaceRawProtoStreamWriter- Specified by:
writeBoolin interfaceTagWriter- Throws:
IOException
-
writeDouble
public void writeDouble(int number, double value) throws IOException- Specified by:
writeDoublein interfaceRawProtoStreamWriter- Specified by:
writeDoublein interfaceTagWriter- Throws:
IOException
-
writeFloat
public void writeFloat(int number, float value) throws IOException- Specified by:
writeFloatin interfaceRawProtoStreamWriter- Specified by:
writeFloatin interfaceTagWriter- Throws:
IOException
-
writeBytes
public void writeBytes(int number, ByteBuffer value) throws IOExceptionDescription copied from interface:RawProtoStreamWriterWrite field tag and all remaining bytes from current buffer position.- Specified by:
writeBytesin interfaceRawProtoStreamWriter- Specified by:
writeBytesin interfaceTagWriter- Throws:
IOException
-
writeBytes
public void writeBytes(int number, byte[] value) throws IOException- Specified by:
writeBytesin interfaceRawProtoStreamWriter- Specified by:
writeBytesin interfaceTagWriter- Throws:
IOException
-
writeBytes
public void writeBytes(int number, byte[] value, int offset, int length) throws IOException- Specified by:
writeBytesin interfaceRawProtoStreamWriter- Specified by:
writeBytesin interfaceTagWriter- Throws:
IOException
-
writeRawByte
public void writeRawByte(byte value) throws IOException- Specified by:
writeRawBytein interfaceRawProtoStreamWriter- Throws:
IOException
-
writeRawBytes
public void writeRawBytes(byte[] value, int offset, int length) throws IOException- Specified by:
writeRawBytesin interfaceRawProtoStreamWriter- Specified by:
writeRawBytesin interfaceTagWriter- Throws:
IOException
-
writeRawBytes
public void writeRawBytes(ByteBuffer value) throws IOException
Description copied from interface:RawProtoStreamWriterWrite all remaining bytes from current buffer position.- Specified by:
writeRawBytesin interfaceRawProtoStreamWriter- Throws:
IOException
-
getSerializationContext
public SerializationContextImpl getSerializationContext()
Description copied from interface:ProtobufTagMarshaller.OperationContextProvides access to theImmutableSerializationContext.- Specified by:
getSerializationContextin interfaceProtobufTagMarshaller.OperationContext
-
getParam
public Object getParam(Object key)
- Specified by:
getParamin interfaceProtobufTagMarshaller.OperationContext
-
setParam
public void setParam(Object key, Object value)
- Specified by:
setParamin interfaceProtobufTagMarshaller.OperationContext
-
getWriter
public TagWriter getWriter()
- Specified by:
getWriterin interfaceProtobufTagMarshaller.WriteContext
-
depth
public int depth()
- Specified by:
depthin interfaceProtobufTagMarshaller.WriteContext
-
getProtoStreamWriter
@Deprecated public org.infinispan.protostream.impl.ProtoStreamWriterImpl getProtoStreamWriter()
Deprecated.this will be removed in 5.0 together withMessageMarshaller
-
-