public abstract class AbstractControl extends AbstractAsn1Object implements Control, CodecControl
| Modifier and Type | Field and Description |
|---|---|
protected ControlDecoder |
decoder |
protected byte[] |
value
Optional control value
|
protected int |
valueLength
The encoded value length
|
parent| Constructor and Description |
|---|
AbstractControl(String oid)
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
int |
computeLength()
Compute the object length, which is the sum of all inner length.
|
int |
computeLength(int valueLength) |
ByteBuffer |
encode(ByteBuffer buffer)
Encode the object to a PDU.
|
ControlDecoder |
getDecoder()
Get the associated decoder
|
String |
getOid()
Get the OID
|
byte[] |
getValue()
Get the control value
|
boolean |
hasValue()
Tells if the Control has a value or not
|
boolean |
isCritical()
Get the criticality
|
void |
setCritical(boolean criticality)
Set the criticality
|
void |
setValue(byte[] value)
Set the encoded control value
|
String |
toString()
Return a String representing a Control
|
addLength, getCurrentLength, getExpectedLength, getParent, getTlvId, setCurrentLength, setExpectedLength, setParentprotected byte[] value
protected int valueLength
protected ControlDecoder decoder
public AbstractControl(String oid)
public String getOid()
public byte[] getValue()
public void setValue(byte[] value)
public boolean isCritical()
isCritical in interface Controltrue if the criticality flag is true.public void setCritical(boolean criticality)
setCritical in interface Controlcriticality - The criticality valuepublic int computeLength()
computeLength in interface Asn1ObjectcomputeLength in interface CodecControlcomputeLength in class AbstractAsn1Objectpublic int computeLength(int valueLength)
public ByteBuffer encode(ByteBuffer buffer) throws EncoderException
encode in interface Asn1Objectencode in interface CodecControlencode in class AbstractAsn1Objectbuffer - The buffer where to put the PDUEncoderException - if the buffer can't be encodedpublic boolean hasValue()
public ControlDecoder getDecoder()
CodecControlgetDecoder in interface CodecControlCopyright © 2003–2016 The Apache Software Foundation. All rights reserved.