Puts a byte and a short into this byte vector. The byte vector is automatically enlarged if necessary. @param b a byte. @param s a short. @return this byte vector.
(final int b, final int s)
| 140 | */ |
| 141 | |
| 142 | public ByteVector put12 (final int b, final int s) { |
| 143 | int length = this.length; |
| 144 | if (length + 3 > data.length) { |
| 145 | enlarge(3); |
| 146 | } |
| 147 | byte[] data = this.data; |
| 148 | data[length++] = (byte)b; |
| 149 | data[length++] = (byte)(s >>> 8); |
| 150 | data[length++] = (byte)s; |
| 151 | this.length = length; |
| 152 | return this; |
| 153 | } |
| 154 | |
| 155 | /** |
| 156 | * Puts an int into this byte vector. The byte vector is automatically |
no test coverage detected