| 1402 | } |
| 1403 | |
| 1404 | @WarnBoxedMath(false) |
| 1405 | static public byte[] byte_array(int size, Object init){ |
| 1406 | byte[] ret = new byte[size]; |
| 1407 | if(init instanceof Byte) |
| 1408 | { |
| 1409 | byte b = (Byte) init; |
| 1410 | for(int i = 0; i < ret.length; i++) |
| 1411 | ret[i] = b; |
| 1412 | } |
| 1413 | else |
| 1414 | { |
| 1415 | ISeq s = RT.seq(init); |
| 1416 | for(int i = 0; i < size && s != null; i++, s = s.next()) |
| 1417 | ret[i] = ((Number) s.first()).byteValue(); |
| 1418 | } |
| 1419 | return ret; |
| 1420 | } |
| 1421 | |
| 1422 | @WarnBoxedMath(false) |
| 1423 | static public byte[] byte_array(Object sizeOrSeq){ |