public class OptionsField extends StringField
Message
which consists of options.
These options represent the possible values for message options in an
AMPS command.LATIN1, LATIN1_ZERO
Modifier | Constructor and Description |
---|---|
|
OptionsField() |
protected |
OptionsField(byte[] buffer,
int position,
int length) |
|
OptionsField(java.lang.String value) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj)
Implementation for
Object.equals(java.lang.Object) for an OptionsField. |
boolean |
getValue(java.nio.ByteBuffer v)
Writes the byte value of this instance into the specified byte buffer, if the value is not null.
|
java.lang.String |
getValue(java.nio.charset.CharsetDecoder decoder)
Returns a string representation of the Field value, where the bytes are interpreted by using the specified
decoder.
|
int |
hashCode()
Implementation of
Object.hashCode() for an OptionsField. |
void |
setValue(byte[] v,
int offset,
int length)
Sets the value of this instance with the specified region of a byte buffer.
|
void |
setValue(java.lang.String v,
java.nio.charset.CharsetEncoder encoder)
Sets the value of this instance from the specified string.
|
getConversionBufInitialSize, getValue, setValue
protected OptionsField(byte[] buffer, int position, int length)
public OptionsField(java.lang.String value)
public OptionsField()
public void setValue(byte[] v, int offset, int length)
StringField
setValue
in class StringField
v
- The byte buffer.offset
- The starting position of the value in the byte buffer.length
- The length from the starting position of the value in the byte buffer.public void setValue(java.lang.String v, java.nio.charset.CharsetEncoder encoder)
StringField
setValue
in class StringField
v
- The string used as the value.encoder
- The encoder used to interpret the string's characters as bytes.public java.lang.String getValue(java.nio.charset.CharsetDecoder decoder)
StringField
getValue
in class StringField
decoder
- The charset decoder used to interpret bytes as characters.public boolean getValue(java.nio.ByteBuffer v)
StringField
getValue
in class StringField
v
- The byte buffer to write in to.public boolean equals(java.lang.Object obj)
Object.equals(java.lang.Object)
for an OptionsField. For two OptionsFields to be
considered equal, their values must have the same length and all bytes in the
value must be equal, other than a possible trailing comma.