ch.panter.li.bi.asn.ber
Interface AsnBerTagLength

All Known Implementing Classes:
AsnBerTagLengthImpl

public interface AsnBerTagLength


Method Summary
 Number getTagLength()
          The tag length of this instance as an abstract number (Integer, Long, BigInteger).
 int getTagLengthAsInt()
          The tag length of this instance as a java int.
 Number getTagLengthLarge()
          The tag length bits of this instance as an abstract number (Long, BigInteger).
 boolean isDefinite()
           
 boolean isIndefinite()
           
 boolean isTagLengthAnInt()
          Determines whether the tag length of this instance can be represented in a java int.
 

Method Detail

isDefinite

boolean isDefinite()

isIndefinite

boolean isIndefinite()

getTagLength

Number getTagLength()
The tag length of this instance as an abstract number (Integer, Long, BigInteger). Always safe to call, independent of the result of isTagLengthAnInt().

Returns:
the tag length of this instance as an abstract number

isTagLengthAnInt

boolean isTagLengthAnInt()
Determines whether the tag length of this instance can be represented in a java int. Depending on the result of this method one of the getTagLengthAsInt() or getTagLengthLarge() must be used to access the tag length.

Returns:
true if it is safe to call getTagLengthAsInt(), false if getTagLengthLarge() must be used.

getTagLengthAsInt

int getTagLengthAsInt()
The tag length of this instance as a java int. May only be called if isTagLengthAnInt() returned true.

Returns:
the tag length of this instance as a java int
Throws:
IllegalStateException - in case the tag length is too large for a java int

getTagLengthLarge

Number getTagLengthLarge()
The tag length bits of this instance as an abstract number (Long, BigInteger). May only be called if isTagLengthAnInt() returned false.

Returns:
the tag length of this instance as an abstract number
Throws:
IllegalStateException - in case the tag length fits into a java int


Copyright 2007-2007 SourceForge. All Rights Reserved.