Package org.apache.bookkeeper.proto
Class ByteStringUtil
java.lang.Object
org.apache.bookkeeper.proto.ByteStringUtil
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic com.google.protobuf.ByteStringbyteBufListToByteString(ByteBufList bufList) Wrap the internal buffers of a ByteBufList into a single ByteString.static com.google.protobuf.ByteStringbyteBufToByteString(io.netty.buffer.ByteBuf byteBuf) Wrap the internal buffers of a ByteBuf into a single ByteString.
-
Constructor Details
-
ByteStringUtil
public ByteStringUtil()
-
-
Method Details
-
byteBufListToByteString
Wrap the internal buffers of a ByteBufList into a single ByteString. The lifecycle of the wrapped ByteString is tied to the ByteBufList.- Parameters:
bufList- ByteBufList to wrap- Returns:
- ByteString wrapping the internal buffers of the ByteBufList
-
byteBufToByteString
public static com.google.protobuf.ByteString byteBufToByteString(io.netty.buffer.ByteBuf byteBuf) Wrap the internal buffers of a ByteBuf into a single ByteString. The lifecycle of the wrapped ByteString is tied to the ByteBuf.- Parameters:
byteBuf- ByteBuf to wrap- Returns:
- ByteString wrapping the internal buffers of the ByteBuf
-