Package org.apache.activemq.protobuf
Class MessageBufferSupport
- java.lang.Object
-
- org.apache.activemq.protobuf.MessageBufferSupport
-
public final class MessageBufferSupport extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
FORZEN_ERROR_MESSAGE
-
Constructor Summary
Constructors Constructor Description MessageBufferSupport()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> void
addAll(java.lang.Iterable<T> values, java.util.Collection<? super T> list)
static int
computeMessageSize(int tag, MessageBuffer message)
static Buffer
readFrame(java.io.InputStream input)
static byte
readRawByte(java.io.InputStream is)
static int
readRawVarint32(java.io.InputStream is)
Read a raw Varint from the stream.static Buffer
toFramedBuffer(MessageBuffer message)
static Buffer
toUnframedBuffer(MessageBuffer message)
static void
writeMessage(CodedOutputStream output, int tag, MessageBuffer message)
-
-
-
Field Detail
-
FORZEN_ERROR_MESSAGE
public static final java.lang.String FORZEN_ERROR_MESSAGE
- See Also:
- Constant Field Values
-
-
Method Detail
-
toUnframedBuffer
public static Buffer toUnframedBuffer(MessageBuffer message)
-
toFramedBuffer
public static Buffer toFramedBuffer(MessageBuffer message)
-
writeMessage
public static void writeMessage(CodedOutputStream output, int tag, MessageBuffer message) throws java.io.IOException
- Throws:
java.io.IOException
-
computeMessageSize
public static int computeMessageSize(int tag, MessageBuffer message)
-
readFrame
public static Buffer readFrame(java.io.InputStream input) throws java.io.IOException
- Throws:
java.io.IOException
-
readRawVarint32
public static int readRawVarint32(java.io.InputStream is) throws java.io.IOException
Read a raw Varint from the stream. If larger than 32 bits, discard the upper bits.- Throws:
java.io.IOException
-
readRawByte
public static byte readRawByte(java.io.InputStream is) throws java.io.IOException
- Throws:
java.io.IOException
-
addAll
public static <T> void addAll(java.lang.Iterable<T> values, java.util.Collection<? super T> list)
-
-