Show / Hide Table of Contents

# Class BitArray

A specialized BitArray implementation that provides the smallest set of functionality needed for Message Auditing. This implementation is used over the .NET bit array to provide a small and more efficient BitArray that performs only the operations needed for Message Audit.

##### Inheritance

System.Object
BitArray

##### Inherited Members

System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()

###### Namespace: Apache.NMS.ActiveMQ.Util

###### Assembly: Apache.NMS.ActiveMQ.dll

##### Syntax

    public class BitArray

### Constructors

| Improve this Doc View Source

#### BitArray()

##### Declaration

    public BitArray()

| Improve this Doc View Source

#### BitArray(Int64)

##### Declaration

    public BitArray(long bits)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Int64 | bits |

### Fields

| Improve this Doc View Source

#### BYTE_SIZE

##### Declaration

    public const int BYTE_SIZE = 8

##### Field Value

Type | Description
--- | ---
System.Int32 |

| Improve this Doc View Source

#### INT_SIZE

##### Declaration

    public const int INT_SIZE = 32

##### Field Value

Type | Description
--- | ---
System.Int32 |

| Improve this Doc View Source

#### LONG_SIZE

##### Declaration

    public const int LONG_SIZE = 64

##### Field Value

Type | Description
--- | ---
System.Int32 |

| Improve this Doc View Source

#### SHORT_SIZE

##### Declaration

    public const int SHORT_SIZE = 16

##### Field Value

Type | Description
--- | ---
System.Int32 |

### Properties

| Improve this Doc View Source

#### Bits

Returns the actual long value containing all the set bits.

##### Declaration

    public long Bits { get; }

##### Property Value

Type | Description
--- | ---
System.Int64 |

| Improve this Doc View Source

#### Length

Returns the current length of the bits that have been set so far in this BitArray.

##### Declaration

    public int Length { get; }

##### Property Value

Type | Description
--- | ---
System.Int32 |

### Methods

| Improve this Doc View Source

#### Get(Int32)

Get the boolean value contains in the BitArray at the given index

##### Declaration

    public bool Get(int index)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Int32 | index |

##### Returns

Type | Description
--- | ---
System.Boolean |

| Improve this Doc View Source

#### Reset()

Reset all the bits to zero or false.

##### Declaration

    public void Reset()

| Improve this Doc View Source

#### Reset(Int64)

Reset all the bits to the given value

##### Declaration

    public void Reset(long bits)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Int64 | bits |

| Improve this Doc View Source

#### Set(Int32, Boolean)

Sets the boolean value of the given bit in the array at the specified index.

##### Declaration

    public bool Set(int index, bool flag)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Int32 | index |
System.Boolean | flag |

##### Returns

Type | Description
--- | ---
System.Boolean |