Package org.infinispan.protostream.impl
Class RawProtoStreamWriterImpl
- java.lang.Object
-
- org.infinispan.protostream.impl.RawProtoStreamWriterImpl
-
- All Implemented Interfaces:
RawProtoStreamWriter
public final class RawProtoStreamWriterImpl extends Object implements RawProtoStreamWriter
- Since:
- 3.0
- Author:
- [email protected]
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
flush()
com.google.protobuf.CodedOutputStream
getDelegate()
static RawProtoStreamWriter
newInstance(byte[] flatArray)
static RawProtoStreamWriter
newInstance(byte[] flatArray, int offset, int length)
static RawProtoStreamWriter
newInstance(OutputStream output)
static RawProtoStreamWriter
newInstance(OutputStream output, int bufferSize)
static RawProtoStreamWriter
newInstance(ByteBuffer byteBuffer)
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)
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
writeRawBytes(byte[] value, int offset, int length)
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
writeUInt32(int number, int value)
void
writeUInt32NoTag(int value)
void
writeUInt64(int number, long value)
void
writeUInt64NoTag(long value)
-
-
-
Method Detail
-
newInstance
public static RawProtoStreamWriter newInstance(OutputStream output)
-
newInstance
public static RawProtoStreamWriter newInstance(OutputStream output, int bufferSize)
-
newInstance
public static RawProtoStreamWriter newInstance(byte[] flatArray)
-
newInstance
public static RawProtoStreamWriter newInstance(byte[] flatArray, int offset, int length)
-
newInstance
public static RawProtoStreamWriter newInstance(ByteBuffer byteBuffer)
-
getDelegate
public com.google.protobuf.CodedOutputStream getDelegate()
-
writeTag
public void writeTag(int number, int wireType) throws IOException
- Specified by:
writeTag
in interfaceRawProtoStreamWriter
- Throws:
IOException
-
writeUInt32NoTag
public void writeUInt32NoTag(int value) throws IOException
- Specified by:
writeUInt32NoTag
in interfaceRawProtoStreamWriter
- Throws:
IOException
-
writeUInt64NoTag
public void writeUInt64NoTag(long value) throws IOException
- Specified by:
writeUInt64NoTag
in interfaceRawProtoStreamWriter
- Throws:
IOException
-
writeString
public void writeString(int number, String value) throws IOException
- Specified by:
writeString
in interfaceRawProtoStreamWriter
- Throws:
IOException
-
writeInt32
public void writeInt32(int number, int value) throws IOException
- Specified by:
writeInt32
in interfaceRawProtoStreamWriter
- Throws:
IOException
-
writeInt64
public void writeInt64(int number, long value) throws IOException
- Specified by:
writeInt64
in interfaceRawProtoStreamWriter
- Throws:
IOException
-
writeFixed32
public void writeFixed32(int number, int value) throws IOException
- Specified by:
writeFixed32
in interfaceRawProtoStreamWriter
- Throws:
IOException
-
writeUInt32
public void writeUInt32(int number, int value) throws IOException
- Specified by:
writeUInt32
in interfaceRawProtoStreamWriter
- Throws:
IOException
-
writeSFixed32
public void writeSFixed32(int number, int value) throws IOException
- Specified by:
writeSFixed32
in interfaceRawProtoStreamWriter
- Throws:
IOException
-
writeSInt32
public void writeSInt32(int number, int value) throws IOException
- Specified by:
writeSInt32
in interfaceRawProtoStreamWriter
- Throws:
IOException
-
writeEnum
public void writeEnum(int number, int value) throws IOException
- Specified by:
writeEnum
in interfaceRawProtoStreamWriter
- Throws:
IOException
-
flush
public void flush() throws IOException
- Specified by:
flush
in interfaceRawProtoStreamWriter
- Throws:
IOException
-
writeBool
public void writeBool(int number, boolean value) throws IOException
- Specified by:
writeBool
in interfaceRawProtoStreamWriter
- Throws:
IOException
-
writeDouble
public void writeDouble(int number, double value) throws IOException
- Specified by:
writeDouble
in interfaceRawProtoStreamWriter
- Throws:
IOException
-
writeFloat
public void writeFloat(int number, float value) throws IOException
- Specified by:
writeFloat
in interfaceRawProtoStreamWriter
- Throws:
IOException
-
writeBytes
public void writeBytes(int number, ByteBuffer value) throws IOException
- Specified by:
writeBytes
in interfaceRawProtoStreamWriter
- Throws:
IOException
-
writeBytes
public void writeBytes(int number, byte[] value) throws IOException
- Specified by:
writeBytes
in interfaceRawProtoStreamWriter
- Throws:
IOException
-
writeBytes
public void writeBytes(int number, byte[] value, int offset, int length) throws IOException
- Specified by:
writeBytes
in interfaceRawProtoStreamWriter
- Throws:
IOException
-
writeUInt64
public void writeUInt64(int number, long value) throws IOException
- Specified by:
writeUInt64
in interfaceRawProtoStreamWriter
- Throws:
IOException
-
writeFixed64
public void writeFixed64(int number, long value) throws IOException
- Specified by:
writeFixed64
in interfaceRawProtoStreamWriter
- Throws:
IOException
-
writeSFixed64
public void writeSFixed64(int number, long value) throws IOException
- Specified by:
writeSFixed64
in interfaceRawProtoStreamWriter
- Throws:
IOException
-
writeSInt64
public void writeSInt64(int number, long value) throws IOException
- Specified by:
writeSInt64
in interfaceRawProtoStreamWriter
- Throws:
IOException
-
writeRawBytes
public void writeRawBytes(byte[] value, int offset, int length) throws IOException
- Specified by:
writeRawBytes
in interfaceRawProtoStreamWriter
- Throws:
IOException
-
-