org.apache.directory.api.asn1.actions
Class AbstractReadBitString<C extends Asn1Container>

java.lang.Object
  extended by org.apache.directory.api.asn1.ber.grammar.GrammarAction<C>
      extended by org.apache.directory.api.asn1.actions.AbstractReadBitString<C>
All Implemented Interfaces:
Action<C>

public abstract class AbstractReadBitString<C extends Asn1Container>
extends GrammarAction<C>

The action used read a BITSTRING from a TLV

Author:
Apache Directory Project

Field Summary
 
Fields inherited from class org.apache.directory.api.asn1.ber.grammar.GrammarAction
name
 
Constructor Summary
AbstractReadBitString(String name)
          Instantiates a new AbstractReadByteArray action.
 
Method Summary
 void action(C container)
          The action to be executed.
protected abstract  void setBitString(byte[] data, C container)
          Gives a byte array to be set to the appropriate field of the ASN.1 object present in the container
 
Methods inherited from class org.apache.directory.api.asn1.ber.grammar.GrammarAction
toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractReadBitString

public AbstractReadBitString(String name)
Instantiates a new AbstractReadByteArray action.

Parameters:
name - the action's name
Method Detail

setBitString

protected abstract void setBitString(byte[] data,
                                     C container)
Gives a byte array to be set to the appropriate field of the ASN.1 object present in the container

Parameters:
data - the data of the read TLV present in byte array format
container - the container holding the ASN.1 object

action

public final void action(C container)
                  throws org.apache.directory.api.asn1.DecoderException
The action to be executed.

Parameters:
container - The container which stores the current data
Throws:
org.apache.directory.api.asn1.DecoderException - Thrown if something went wrong.


Copyright © 2003-2013 The Apache Software Foundation. All Rights Reserved.