Concatenates byte arrays together.
(final byte[]... arrays)
| 275 | |
| 276 | /** Concatenates byte arrays together. */ |
| 277 | protected static byte[] concat(final byte[]... arrays) { |
| 278 | int len = 0; |
| 279 | for (final byte[] array : arrays) { |
| 280 | len += array.length; |
| 281 | } |
| 282 | final byte[] result = new byte[len]; |
| 283 | len = 0; |
| 284 | for (final byte[] array : arrays) { |
| 285 | System.arraycopy(array, 0, result, len, array.length); |
| 286 | len += array.length; |
| 287 | } |
| 288 | return result; |
| 289 | } |
| 290 | |
| 291 | /** Creates a new Deferred that's already called back. */ |
| 292 | protected static <T> Answer<Deferred<T>> newDeferred(final T result) { |
no outgoing calls
no test coverage detected