Skip to content

Commit 5f78cb3

Browse files
committed
Update readme
1 parent 3e28bc2 commit 5f78cb3

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

README.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff 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
5858
Bytes b = Bytes.wrap(someByteArray); //reuse given reference
5959
b.copy().reverse(); //reverse the bytes on a copied instance
6060
String 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

6576
Per default the instance is **immutable**, which means any transformation will

0 commit comments

Comments
 (0)