Does anyone know of any method of replacement for ArrayList

Purpose:

Using a method to add the element Byte.

Problem:

Tyr to use Vector or ByteVector, but stop to a Byte [].

origianl code

public ArrayList = new ArrayList () cpu_config;

{} public void setConfigInt (char key, int value)
To add items
cpu_config. Add (new Byte ((byte) key));
Byte [] arr is Util.itob (value);.
cpu_config. Add (new Byte(arr[0]));
cpu_config. Add (new Byte(arr[1]));
cpu_config. Add (new Byte(arr[2]));
cpu_config. Add (new Byte(arr[3]));
}

Does anyone know any alternative method?

Thank you for your attention.

public ByteVector cpu_config = new ByteVector();

{} public void setConfigInt (char key, int value)

ByteVector method
key to cpu_config. AddElement ((Byte));
Byte [] arr is Util.itob (value);.
cpu_config. AddElement ((arr[0]));
cpu_config. AddElement ((arr[1]));
cpu_config. AddElement ((arr[2]));
cpu_config. AddElement ((arr[3]));

}

Solved.

See you soon,.

Tags: BlackBerry Developers

Similar Questions

Maybe you are looking for