Implements the Abstract Syntax Notation One (ASN1) functionality. ASN1BitSet is an immutable collection of bits. This class is returned
by the call in ASN1InputStream.readBitString.
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Create a new ASN1BitSet instance. Note that only a reference to data is
stored in this class, not a copy of the array.
This assumes that bits in data are indexed from the left-most bit to the right most bit ( network-byte
order ) and that the low order bits are found in data[0]
ie. byte = 0x51 has the following bits set : 1, 3, 7.
Parameters:
data - The byte array storing the bits.
size - The number of bits in the byte array ( must not differ by more than 7 bits from data.length ).
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Appends the contents of two ASN1BitSets together and returns the result.
Parameters:
bitSetOne - The ASN1BitSet to start with.
bitsetTwo - The ASN1BitSet to append to bitsetTwo.
Returns:
The new combined ASN1BitSet.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Indicates whether some other object is "equal to" this one.
The equals method implements an equivalence relation:
It is reflexive: for any reference value x,
x.equals(x) should return true.
It is symmetric: for any reference values x and
y, x.equals(y) should return
true if and only if y.equals(x) returns
true.
It is transitive: for any reference values x,
y, and z, if x.equals(y)
returns true and y.equals(z) returns
true, then x.equals(z) should return
true.
It is consistent: for any reference values x
and y, multiple invocations of x.equals(y)
consistently return true or consistently return
false, provided no information used in
equals comparisons on the object is modified.
For any non-null reference value x,
x.equals(null) should return false.
The equals method for class Object implements
the most discriminating possible equivalence relation on objects;
that is, for any reference values x and y,
this method returns true if and only if x and
y refer to the same object (x==y has the
value true).
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
getFirstSet
public int getFirstSet()
Retrieves the first bit set.
Returns:
Returns -1 if no bits set, otherwise returns the index.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
getLastSet
public int getLastSet()
Retrieves the last bit set.
Returns:
Returns -1 if no bits set, otherwise the index.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
getLength
public int getLength()
Returns the number of bits represented by this bit set.
Returns:
An integer that represents the number of bits.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
getNextSet
public int getNextSet(int index)
Retrieve the next bit set starting at the given index. If index is set, index will be returned.
This assumes that the bits are indexed from the left-most bit to the right most bit ( network-byte
order ) and that the low order bits are found at array index 0, in the backing byte array.
ie. byte = 0x51 has the following bits set : 1, 3, 7
Parameters:
index - The first bit to check in ascending order.
Returns:
-1 if no more bits set, otherwise the index is returned.
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
getNumSet
public int getNumSet()
Retrieve the number of set bits in the collection.
Returns:
An integer that represents the number of set bits.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
getPreviousSet
public int getPreviousSet(int index)
Retrieve the previous bit set starting at the given index. If index is set, index will be returned.
This assumes that the bits are indexed from the left-most bit to the right most bit ( network-byte
order ) and that the low order bits are found at array index 0, in the backing byte array.
ie. byte = 0x51 has the following bits set : 1, 3, 7
Parameters:
index - The first bit to check in reverse order.
Returns:
-1 if no previous bits set, otherwise the index is returned.
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
isSet
public boolean isSet(int index)
Test if a particular bit is set, starting from index 0.
This assumes that the bits are indexed from the left-most bit to the right most bit ( network-byte
order ) and that the low order bits are found at array index 0, in the backing byte array.
ie. byte = 0x51 has the following bits set : 1, 3, 7
Parameters:
index - The index number of the bit to test.
Returns:
A boolean that returns true if the bit is set. Returns false otherwise.
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
toByteArray
public byte[] toByteArray()
Returns a copy of the byte array that underlies this bit set.
Returns:
The byte array.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Copyright 1999-2009 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved. Copyright 1993-2003 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. Copyright 2002-2003 Nokia Corporation All Rights Reserved. Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.