Package org.apache.bookkeeper.proto
Class ByteStringUtil
- java.lang.Object
-
- org.apache.bookkeeper.proto.ByteStringUtil
-
public class ByteStringUtil extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description ByteStringUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static com.google.protobuf.ByteString
byteBufListToByteString(ByteBufList bufList)
Wrap the internal buffers of a ByteBufList into a single ByteString.static com.google.protobuf.ByteString
byteBufToByteString(io.netty.buffer.ByteBuf byteBuf)
Wrap the internal buffers of a ByteBuf into a single ByteString.
-
-
-
Method Detail
-
byteBufListToByteString
public static com.google.protobuf.ByteString byteBufListToByteString(ByteBufList bufList)
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
-
-