Puts an int into this byte vector. The byte vector is automatically enlarged if necessary. @param intValue an int. @return this byte vector.
(final int intValue)
| 169 | * @return this byte vector. |
| 170 | */ |
| 171 | public ByteVector putInt(final int intValue) { |
| 172 | int currentLength = length; |
| 173 | if (currentLength + 4 > data.length) { |
| 174 | enlarge(4); |
| 175 | } |
| 176 | byte[] currentData = data; |
| 177 | currentData[currentLength++] = (byte) (intValue >>> 24); |
| 178 | currentData[currentLength++] = (byte) (intValue >>> 16); |
| 179 | currentData[currentLength++] = (byte) (intValue >>> 8); |
| 180 | currentData[currentLength++] = (byte) intValue; |
| 181 | length = currentLength; |
| 182 | return this; |
| 183 | } |
| 184 | |
| 185 | /** |
| 186 | * Puts one byte and two shorts into this byte vector. The byte vector is automatically enlarged |
no test coverage detected