public static final Bytes of ( byte [ ] array ) { Objects . requireNonNull ( array ) ; if ( array . length == 0 ) { return EMPTY ; } byte [ ] copy = new byte [ array . length ] ; System . arraycopy ( array , 0 , copy , 0 , array . length ) ; return new Bytes ( copy ) ; }
Creates a Bytes object by copying the data of the given byte array