public interface IPBWireByteMarkerHelper
| Modifier and Type | Method and Description |
|---|---|
int |
bytesToInteger(byte[] marker)
Convert the marker byte array to an integer where each item is part of byte shifted integer
|
byte[] |
createMessageDelimiter(com.google.protobuf.GeneratedMessage message)
Create a delimiter for the given GeneratedMessage.
|
int |
estimateTotalContentLength(List<? extends com.google.protobuf.GeneratedMessage> messages)
Estimate the total number of bytes that will be used in a stream for a list
of messages - this includes delimeters.
|
int |
getByteMarkerSize()
Get the number of bytes holding a message size, where these bytes are within
the delimiter byte array and follow the byte marker.
|
int |
getDelimiterSize()
Get the total number of bytes of a delimeter for a generated message.
|
byte |
getMarkerForStart()
Get the byte marker used to identify the start of the delimiter.
|
byte[] |
integerToBytesBigEndian(int value)
Convert the integer into a byte array composed of byte shifted parts of the integer.
|
int bytesToInteger(byte[] marker)
marker - big endian byte markerbyte[] createMessageDelimiter(com.google.protobuf.GeneratedMessage message)
message - instance of GeneratedMessageint estimateTotalContentLength(List<? extends com.google.protobuf.GeneratedMessage> messages)
messages - instances of GeneratedMessageint getByteMarkerSize()
int getDelimiterSize()
byte getMarkerForStart()
byte[] integerToBytesBigEndian(int value)
value - the integer to be represented by the returned byte arrayCopyright © 2017. All rights reserved.