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