org.apache.asn1.ber
Class TagOctetCollector

java.lang.Object
  extended byorg.apache.asn1.ber.TagOctetCollector

public class TagOctetCollector
extends java.lang.Object

Collects up to 4 tag octets.

Version:
$Rev: 157644 $
Author:
Apache Directory Project

Field Summary
private  int _size
          the number of octets currently stored
private  int intValue
          the int used to store the tag octets
 
Constructor Summary
TagOctetCollector()
           
 
Method Summary
 void clear()
          Clears all the tag octets resetting the tag and size to zero.
 byte get(int index)
          Gets the byte at a specific index.
 int getIntValue()
          Gets a unique integer value representing the tag octets.
 void put(byte octet)
          Puts an octet into this collector.
 int size()
          Gets the number of octets stored by this TagOctetCollector
 byte[] toArray()
          Gets the 4 octets for the tag.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

intValue

private int intValue
the int used to store the tag octets


_size

private int _size
the number of octets currently stored

Constructor Detail

TagOctetCollector

public TagOctetCollector()
Method Detail

put

public void put(byte octet)
Puts an octet into this collector.

Parameters:
octet - the octet to put into the collector.

clear

public void clear()
Clears all the tag octets resetting the tag and size to zero.


size

public int size()
Gets the number of octets stored by this TagOctetCollector

Returns:

getIntValue

public int getIntValue()
Gets a unique integer value representing the tag octets.

Returns:
the integer value of the tag.

toArray

public byte[] toArray()
Gets the 4 octets for the tag.

Returns:

get

public byte get(int index)
Gets the byte at a specific index.

Parameters:
index -
Returns:
Throws:
java.lang.IndexOutOfBoundsException


Copyright © 2004-2006 . All Rights Reserved.