Puts an int into this byte vector. The byte vector is automatically enlarged if necessary. @param i an int. @return this byte vector.
(final int i)
| 161 | */ |
| 162 | |
| 163 | public ByteVector put4 (final int i) { |
| 164 | int length = this.length; |
| 165 | if (length + 4 > data.length) { |
| 166 | enlarge(4); |
| 167 | } |
| 168 | byte[] data = this.data; |
| 169 | data[length++] = (byte)(i >>> 24); |
| 170 | data[length++] = (byte)(i >>> 16); |
| 171 | data[length++] = (byte)(i >>> 8); |
| 172 | data[length++] = (byte)i; |
| 173 | this.length = length; |
| 174 | return this; |
| 175 | } |
| 176 | |
| 177 | /** |
| 178 | * Puts a long into this byte vector. The byte vector is automatically |
no test coverage detected