Package com.unboundid.util
Interface ByteString
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
ASN1OctetString
@NotExtensible
@ThreadSafety(level=INTERFACE_THREADSAFE)
public interface ByteString
extends Serializable
This interface defines a set of methods for treating a value as either a
string or byte array.
-
Method Summary
Modifier and TypeMethodDescriptionvoidappendValueTo(ByteStringBuffer buffer) Appends the value of this byte string to the provided buffer.byte[]getValue()Retrieves a byte array containing the binary value for this byte string.Retrieves the value for this byte string as aString.Converts this byte string to an ASN.1 octet string.
-
Method Details
-
getValue
Retrieves a byte array containing the binary value for this byte string.- Returns:
- A byte array containing the binary value for this byte string.
-
stringValue
Retrieves the value for this byte string as aString.- Returns:
- The value for this byte string as a
String.
-
appendValueTo
Appends the value of this byte string to the provided buffer. It must not use theByteStringBuffer.append(ByteString)method, since that method relies on this method.- Parameters:
buffer- The buffer to which the value should be appended.
-
toASN1OctetString
Converts this byte string to an ASN.1 octet string.- Returns:
- An ASN.1 octet string with the value of this byte string.
-