Puts one byte and two shorts into this byte vector. The byte vector is automatically enlarged if necessary. @param byteValue a byte. @param shortValue1 a short. @param shortValue2 another short. @return this byte vector.
(final int byteValue, final int shortValue1, final int shortValue2)
| 192 | * @return this byte vector. |
| 193 | */ |
| 194 | final ByteVector put122(final int byteValue, final int shortValue1, final int shortValue2) { |
| 195 | int currentLength = length; |
| 196 | if (currentLength + 5 > data.length) { |
| 197 | enlarge(5); |
| 198 | } |
| 199 | byte[] currentData = data; |
| 200 | currentData[currentLength++] = (byte) byteValue; |
| 201 | currentData[currentLength++] = (byte) (shortValue1 >>> 8); |
| 202 | currentData[currentLength++] = (byte) shortValue1; |
| 203 | currentData[currentLength++] = (byte) (shortValue2 >>> 8); |
| 204 | currentData[currentLength++] = (byte) shortValue2; |
| 205 | length = currentLength; |
| 206 | return this; |
| 207 | } |
| 208 | |
| 209 | /** |
| 210 | * Puts a long into this byte vector. The byte vector is automatically enlarged if necessary. |
no test coverage detected