castore : store in character array : index : visitInsn()

Description
Pops a 32-bit integer from the stack, truncates it to a 16-bit unsigned value, and stores it in an array of characters. arrayref is a reference to an array of 16-bit Unicode characters. index is an int. value is the int value to be stored in the array. arrayref, index and value are removed from the stack, and value is stored in the array at the given index.
Exceptions
NullPointerException - arrayref is null

ArrayIndexOutOfBoundsException - index is < 0 or >= arrayref.length
Notes
Array indices start at 0 (the first entry in the array is at index 0).
See also
iastore lastore fastore dastore aastore bastore sastore iaload laload faload daload aaload baload caload saload
Stack
Before After
value ...
index ...
arrayref ...
... ...
Bytecode
Type Description
u1 castore opcode = 0x55 (85)