Returns the character located at the specified index in the buffer. The index value is referenced from the current buffer position. @param index the index referenced from the current buffer position. It must not be less than zero but less than the value obtained from a
(int index)
| 214 | * if the index is invalid. |
| 215 | */ |
| 216 | public final char charAt(int index) { |
| 217 | if (index < 0 || index >= remaining()) { |
| 218 | throw new IndexOutOfBoundsException(); |
| 219 | } |
| 220 | return get(position + index); |
| 221 | } |
| 222 | |
| 223 | /** |
| 224 | * Compacts this char buffer. |