Package org.apache.qpid.protonj2.types
Class Symbol
java.lang.Object
org.apache.qpid.protonj2.types.Symbol
- All Implemented Interfaces:
Comparable<Symbol>
Class that represents an AMQP Symbol value. The creation of a Symbol object
occurs during a lookup operation which cannot find an already stored version
of the string or byte buffer view of the Symbol's ASCII bytes.
-
Method Summary
Modifier and TypeMethodDescriptionint
boolean
int
static Symbol
static Symbol
getSymbol
(ProtonBuffer symbolBytes) static Symbol
getSymbol
(ProtonBuffer symbolBuffer, boolean copyOnCreate) int
hashCode()
toString()
static Symbol
void
writeTo
(ProtonBuffer target) Writes the internalSymbol
bytes to the providedProtonBuffer
.
-
Method Details
-
getLength
public int getLength()- Returns:
- the number of bytes that comprise the Symbol value.
-
compareTo
- Specified by:
compareTo
in interfaceComparable<Symbol>
-
toString
-
hashCode
public int hashCode() -
equals
-
writeTo
Writes the internalSymbol
bytes to the providedProtonBuffer
. This is a raw ASCII encoding of the Symbol without and AMQP type encoding.- Parameters:
target
- The buffer where the Symbol bytes should be written to.
-
valueOf
-
getSymbol
-
getSymbol
- Parameters:
symbolBuffer
- TheProtonBuffer
version of theSymbol
value.copyOnCreate
- Should the provided buffer be copied during creation of a newSymbol
.- Returns:
- a
Symbol
that matches the givenString
.
-
getSymbol
-