public static final Bytes of ( String s ) { Objects . requireNonNull ( s ) ; if ( s . isEmpty ( ) ) { return EMPTY ; } byte [ ] data = s . getBytes ( StandardCharsets . UTF_8 ) ; return new Bytes ( data , s ) ; }
Creates a Bytes object by copying the value of the given String