Puts a short into this byte vector. The byte vector is automatically enlarged if necessary. @param s a short. @return this byte vector.
(final int s)
| 119 | */ |
| 120 | |
| 121 | public ByteVector put2 (final int s) { |
| 122 | int length = this.length; |
| 123 | if (length + 2 > data.length) { |
| 124 | enlarge(2); |
| 125 | } |
| 126 | byte[] data = this.data; |
| 127 | data[length++] = (byte)(s >>> 8); |
| 128 | data[length++] = (byte)s; |
| 129 | this.length = length; |
| 130 | return this; |
| 131 | } |
| 132 | |
| 133 | /** |
| 134 | * Puts a byte and a short into this byte vector. The byte vector is |
no test coverage detected