File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -52,14 +52,25 @@ Add dependency to your `pom.xml`:
5252 <version>{latest-version}</version>
5353 </dependency>
5454
55- A very simple example:
55+ Some simple example:
5656
5757``` java
5858Bytes b = Bytes . wrap(someByteArray); // reuse given reference
5959b. copy(). reverse(); // reverse the bytes on a copied instance
6060String hex = b. encodeHex(); // encode base16/hex
6161```
6262
63+ ``` java
64+ Bytes b = Bytes . parseHex(" 0ae422f3" ); // parse from hex string
65+ int result = b. toInt(); // get as signed int
66+ ```
67+
68+ ``` java
69+ Bytes b = Bytes . from(array1); // create from copy of array1
70+ b. resize(2 ). xor(arry2); // shrink to 2 bytes and xor with other array
71+ byte [] result = b. array(); // get as byte array
72+ ```
73+
6374## API Description
6475
6576Per default the instance is ** immutable** , which means any transformation will
You can’t perform that action at this time.
0 commit comments