Package com.google.protobuf
Class DhProtoUtil
java.lang.Object
com.google.protobuf.DhProtoUtil
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringbyteArrayToHex(byte[] bs) static StringbyteStringToHex(com.google.protobuf.ByteString bstr) static StringdecodeUtf8(byte[] bytes, int index, int size) Decodes the given UTF-8 encoded byte array slice into aString.static com.google.protobuf.InvalidProtocolBufferExceptionstatic com.google.protobuf.InvalidProtocolBufferExceptionstatic com.google.protobuf.InvalidProtocolBufferExceptionstatic com.google.protobuf.InvalidProtocolBufferExceptionstatic com.google.protobuf.InvalidProtocolBufferExceptionstatic com.google.protobuf.InvalidProtocolBufferExceptionstatic com.google.protobuf.InvalidProtocolBufferExceptionstatic com.google.protobuf.InvalidProtocolBufferExceptionstatic com.google.protobuf.ByteStringwrapAsByteString(byte[] bs) Wrap as a ByteString a provided byte array, taking ownership of it.static com.google.protobuf.ByteStringwrapAsByteString(byte[] bs, int offset, int length) Wrap as a ByteString a provided byte array, taking ownership of it.
-
Constructor Details
-
DhProtoUtil
public DhProtoUtil()
-
-
Method Details
-
wrapAsByteString
public static com.google.protobuf.ByteString wrapAsByteString(byte[] bs) Wrap as a ByteString a provided byte array, taking ownership of it.- Parameters:
bs- A byte array to wrap as a ByteString. Note the implementation takes ownership of the provided array.- Returns:
- a ByteString wrapping the provided array.
-
wrapAsByteString
public static com.google.protobuf.ByteString wrapAsByteString(byte[] bs, int offset, int length) Wrap as a ByteString a provided byte array, taking ownership of it.- Parameters:
bs- A byte array to wrap as a ByteString. Note the implementation takes ownership of the provided array.offset- the position offset in the byte array provided, to start from.length- the length in bytes from the position offset to use.- Returns:
- a ByteString wrapping the provided array.
-
decodeUtf8
public static String decodeUtf8(byte[] bytes, int index, int size) throws com.google.protobuf.InvalidProtocolBufferException Decodes the given UTF-8 encoded byte array slice into aString.- Throws:
com.google.protobuf.InvalidProtocolBufferException- if the input is not valid UTF-8.
-
truncatedMessage
public static com.google.protobuf.InvalidProtocolBufferException truncatedMessage() -
negativeSize
public static com.google.protobuf.InvalidProtocolBufferException negativeSize() -
malformedVarint
public static com.google.protobuf.InvalidProtocolBufferException malformedVarint() -
invalidTag
public static com.google.protobuf.InvalidProtocolBufferException invalidTag() -
invalidEndTag
public static com.google.protobuf.InvalidProtocolBufferException invalidEndTag() -
invalidWireType
public static com.google.protobuf.InvalidProtocolBufferException invalidWireType() -
recursionLimitExceeded
public static com.google.protobuf.InvalidProtocolBufferException recursionLimitExceeded() -
sizeLimitExceeded
public static com.google.protobuf.InvalidProtocolBufferException sizeLimitExceeded() -
byteStringToHex
-
byteArrayToHex
-