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()
Initializes a new instance of the OptionsField class.
|
protected |
OptionsField(byte[] buffer,
int position,
int length)
Initializes a new instance of the OptionsField class with the
specified buffer, position, and length.
|
|
OptionsField(java.lang.String value)
Initializes a new instance of the OptionsField class with
the specified 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)
Retrieves the value of this OptionsField as a byte buffer.
|
java.lang.String |
getValue(java.nio.charset.CharsetDecoder decoder)
Retrieves the value of this OptionsField as a string using the specified
charset decoder.
|
int |
hashCode()
Implementation of
Object.hashCode() for an OptionsField. |
void |
setValue(byte[] v,
int offset,
int length)
Sets the value of this OptionsField using the specified byte array,
offset, and length.
|
void |
setValue(java.lang.String v,
java.nio.charset.CharsetEncoder encoder)
Sets the value of this OptionsField using the specified string
value and charset encoder.
|
getConversionBufInitialSize, getValue, setValue
protected OptionsField(byte[] buffer, int position, int length)
buffer
- The byte array buffer containing the options.position
- The starting position of the options within
the buffer.length
- The length of the options.public OptionsField(java.lang.String value)
value
- The string value representing the options.public OptionsField()
public void setValue(byte[] v, int offset, int length)
setValue
in class StringField
v
- The byte array containing the value to set.offset
- The starting offset in the byte array.length
- The length of the value to set.public void setValue(java.lang.String v, java.nio.charset.CharsetEncoder encoder)
setValue
in class StringField
v
- The string value to set.encoder
- The charset encoder to use.public java.lang.String getValue(java.nio.charset.CharsetDecoder decoder)
getValue
in class StringField
decoder
- The charset decoder to use.public boolean getValue(java.nio.ByteBuffer v)
getValue
in class StringField
v
- The byte buffer to store the value.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.