org.webdocwf.util.smime.util
Class DERLengthSearcher

java.lang.Object
  |
  +--org.webdocwf.util.smime.util.DERLengthSearcher

public class DERLengthSearcher
extends java.lang.Object

DERLengthSearcher is used for searching the content length of inner DER object, and for counting the number of length octets in that DER object. This data can be used later for counting length of the whole inner DER encoded object as:
1 + number of length octets + number of content octets


Constructor Summary
DERLengthSearcher(int startElement0, byte[] array0)
          Construction with the position (index) of the inner DER encoded object, which length is required, and with the structured outer DER encoded object represented as byte array
 
Method Summary
 int getLengthtDERContentPart()
          Returns the number of the content octets in particular DER encoded object
 int getLengthtDERLengthPart()
          Returns the number of the length octets in particular DER encoded object
 void newInitialization(int startElement0, byte[] array0)
          Initialization of the next length searching
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DERLengthSearcher

public DERLengthSearcher(int startElement0,
                         byte[] array0)
Construction with the position (index) of the inner DER encoded object, which length is required, and with the structured outer DER encoded object represented as byte array
Parameters:
startElement0 - position in byte array where inner DER object begines (Start element is always DER object type identifier)
array0 - structured DER encoded object in which is counted the length of particular inner DER object
Method Detail

newInitialization

public void newInitialization(int startElement0,
                              byte[] array0)
Initialization of the next length searching
Parameters:
startElement0 - starting element for next searching
array0 - structured DER encoded object in which the length of the particular iner DER object is being counted

getLengthtDERContentPart

public int getLengthtDERContentPart()
Returns the number of the content octets in particular DER encoded object
Returns:
Number of content octets

getLengthtDERLengthPart

public int getLengthtDERLengthPart()
Returns the number of the length octets in particular DER encoded object
Returns:
Number of length octets


Copyright © 2002-2002 Together Teamlösungen. All Rights Reserved.