Class ByteStringUtil

java.lang.Object
org.apache.bookkeeper.proto.ByteStringUtil

public class ByteStringUtil extends Object
  • Constructor Details

    • ByteStringUtil

      public ByteStringUtil()
  • Method Details

    • 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