File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed
src/test/java/at/favre/lib/bytes Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -486,16 +486,22 @@ To other collections
486486
487487``` java
488488Bytes . wrap(array). toList(); // of type List<Byte>
489- Bytes . wrap(array). toObjectArray (); // of type Byte[]
489+ Bytes . wrap(array). toBoxedArray (); // of type Byte[]
490490Bytes . wrap(array). toBitSet(); // of type java.util.BitSet
491491```
492492
493- and to [ ` BigInteger ` ] ( https://docs.oracle.com/javase/7/docs/api/java/math/BigInteger.html ) of course:
493+ to [ ` BigInteger ` ] ( https://docs.oracle.com/javase/7/docs/api/java/math/BigInteger.html ) of course
494494
495495``` java
496496Bytes . wrap(array). toBigInteger();
497497```
498498
499+ and others
500+
501+ ``` java
502+ Bytes . wrap(array). toUUID(); // convert 16 byte to UUID
503+ ```
504+
499505### Mutable and Read-Only
500506
501507Per default the instance is immutable, i.e. every transformation will create a
Original file line number Diff line number Diff line change @@ -45,6 +45,7 @@ private void checkArray(byte[] array) {
4545 for (int i = 0 ; i < array .length ; i ++) {
4646 assertEquals (byteArray [i ], Byte .valueOf (array [i ]));
4747 }
48+ assertArrayEquals (byteArray , Bytes .from (array ).toObjectArray ());
4849 }
4950
5051 @ Test
You can’t perform that action at this time.
0 commit comments