public class SizeComputingProtoStreamWriter extends Object implements ProtoStreamWriter, Supplier<OptionalInt>
ProtoStreamWriter implementation that does not write to any stream, but instead computes the number of bytes that would be written to a stream.| Constructor and Description |
|---|
SizeComputingProtoStreamWriter(org.infinispan.protostream.ImmutableSerializationContext context) |
| Modifier and Type | Method and Description |
|---|---|
void |
flush() |
OptionalInt |
get() |
org.infinispan.protostream.ImmutableSerializationContext |
getSerializationContext() |
void |
writeBool(int index,
boolean value) |
void |
writeBoolNoTag(boolean value) |
void |
writeBytes(int index,
byte[] value) |
void |
writeBytes(int index,
byte[] value,
int offset,
int length) |
void |
writeBytes(int index,
ByteBuffer value) |
void |
writeDouble(int index,
double value) |
void |
writeDoubleNoTag(double value) |
<E extends Enum<E>> |
writeEnum(int index,
E value) |
void |
writeEnum(int index,
int value) |
void |
writeFixed32(int index,
int value) |
void |
writeFixed64(int index,
long value) |
void |
writeFloat(int index,
float value) |
void |
writeFloatNoTag(float value) |
void |
writeInt32(int index,
int value) |
void |
writeInt64(int index,
long value) |
void |
writeObject(int index,
Object value) |
void |
writeObjectNoTag(Object value) |
void |
writeRawByte(byte value) |
void |
writeRawBytes(byte[] value,
int offset,
int length) |
void |
writeSFixed32(int index,
int value) |
void |
writeSFixed64(int index,
long value) |
void |
writeSInt32(int index,
int value) |
void |
writeSInt32NoTag(int value) |
void |
writeSInt64(int index,
long value) |
void |
writeSInt64NoTag(long value) |
void |
writeString(int index,
String value) |
void |
writeStringNoTag(String value) |
void |
writeTag(int index,
int wireType) |
void |
writeUInt32(int index,
int value) |
void |
writeUInt32NoTag(int value) |
void |
writeUInt64(int index,
long value) |
void |
writeUInt64NoTag(long value) |
public SizeComputingProtoStreamWriter(org.infinispan.protostream.ImmutableSerializationContext context)
public OptionalInt get()
get in interface Supplier<OptionalInt>public org.infinispan.protostream.ImmutableSerializationContext getSerializationContext()
getSerializationContext in interface ProtoStreamWriterpublic void writeTag(int index,
int wireType)
writeTag in interface org.infinispan.protostream.RawProtoStreamWriterpublic void writeUInt32NoTag(int value)
writeUInt32NoTag in interface org.infinispan.protostream.RawProtoStreamWriterpublic void writeUInt64NoTag(long value)
writeUInt64NoTag in interface org.infinispan.protostream.RawProtoStreamWriterpublic void writeString(int index,
String value)
writeString in interface org.infinispan.protostream.RawProtoStreamWriterpublic void writeInt32(int index,
int value)
writeInt32 in interface org.infinispan.protostream.RawProtoStreamWriterpublic void writeFixed32(int index,
int value)
writeFixed32 in interface org.infinispan.protostream.RawProtoStreamWriterpublic void writeUInt32(int index,
int value)
writeUInt32 in interface org.infinispan.protostream.RawProtoStreamWriterpublic void writeSFixed32(int index,
int value)
writeSFixed32 in interface org.infinispan.protostream.RawProtoStreamWriterpublic void writeSInt32(int index,
int value)
writeSInt32 in interface org.infinispan.protostream.RawProtoStreamWriterpublic void writeInt64(int index,
long value)
writeInt64 in interface org.infinispan.protostream.RawProtoStreamWriterpublic void writeUInt64(int index,
long value)
writeUInt64 in interface org.infinispan.protostream.RawProtoStreamWriterpublic void writeFixed64(int index,
long value)
writeFixed64 in interface org.infinispan.protostream.RawProtoStreamWriterpublic void writeSFixed64(int index,
long value)
writeSFixed64 in interface org.infinispan.protostream.RawProtoStreamWriterpublic void writeSInt64(int index,
long value)
writeSInt64 in interface org.infinispan.protostream.RawProtoStreamWriterpublic void writeEnum(int index,
int value)
writeEnum in interface org.infinispan.protostream.RawProtoStreamWriterpublic void writeBool(int index,
boolean value)
writeBool in interface org.infinispan.protostream.RawProtoStreamWriterpublic void writeDouble(int index,
double value)
writeDouble in interface org.infinispan.protostream.RawProtoStreamWriterpublic void writeFloat(int index,
float value)
writeFloat in interface org.infinispan.protostream.RawProtoStreamWriterpublic void writeBytes(int index,
ByteBuffer value)
writeBytes in interface org.infinispan.protostream.RawProtoStreamWriterpublic void writeBytes(int index,
byte[] value)
writeBytes in interface org.infinispan.protostream.RawProtoStreamWriterpublic void writeBytes(int index,
byte[] value,
int offset,
int length)
writeBytes in interface org.infinispan.protostream.RawProtoStreamWriterpublic void writeRawBytes(byte[] value,
int offset,
int length)
writeRawBytes in interface org.infinispan.protostream.RawProtoStreamWriterpublic void flush()
flush in interface org.infinispan.protostream.RawProtoStreamWriterpublic void writeObject(int index,
Object value)
writeObject in interface ProtoStreamWriterpublic void writeObjectNoTag(Object value)
writeObjectNoTag in interface ProtoStreamWriterpublic <E extends Enum<E>> void writeEnum(int index, E value) throws IOException
writeEnum in interface ProtoStreamWriterIOExceptionpublic void writeStringNoTag(String value)
writeStringNoTag in interface ProtoStreamWriterpublic void writeBoolNoTag(boolean value)
throws IOException
writeBoolNoTag in interface ProtoStreamWriterIOExceptionpublic void writeSInt32NoTag(int value)
throws IOException
writeSInt32NoTag in interface ProtoStreamWriterIOExceptionpublic void writeSInt64NoTag(long value)
throws IOException
writeSInt64NoTag in interface ProtoStreamWriterIOExceptionpublic void writeFloatNoTag(float value)
throws IOException
writeFloatNoTag in interface ProtoStreamWriterIOExceptionpublic void writeDoubleNoTag(double value)
throws IOException
writeDoubleNoTag in interface ProtoStreamWriterIOExceptionpublic void writeRawByte(byte value)
throws IOException
writeRawByte in interface ProtoStreamWriterIOExceptionCopyright © 2021 JBoss by Red Hat. All rights reserved.