Sets the current length of the data in the buffer. @param size the new length
(int size)
| 134 | * @param size the new length |
| 135 | */ |
| 136 | public void setLength(int size) { |
| 137 | if (size > buf.length) { |
| 138 | throw new ArrayIndexOutOfBoundsException(sm.getString("xByteBuffer.size.larger.buffer")); |
| 139 | } |
| 140 | bufSize = size; |
| 141 | } |
| 142 | |
| 143 | /** |
| 144 | * Trims the specified number of bytes from the end of the buffer. |