UnsignedByteArrays { @NotNull public static UnsignedByteArray from( @NotNull final byte[] bytes) { return new UnsignedByteArray(bytes); } private  UnsignedByteArrays(); @NotNull static UnsignedByteArray from(
            @NotNull
            final byte[] bytes); @NotNull static UnsignedByteArray from(
            @NotNull
            final Buffer buffer); @NotNull static UnsignedByteArray from(
            @NotNull
            final String s); @NotNull static String toString(
            @NotNull
            final UnsignedByteArray bytes); @NotNull static UnsignedByteArray from(final long l); static long toLong(
            @NotNull
            final UnsignedByteArray bytes); @NotNull static UnsignedByteArray from(final int i); @NotNull static UnsignedByteArray from(final char c); static int toInt(
            @NotNull
            final UnsignedByteArray bytes); @NotNull static UnsignedByteArray from(final short s); static short toShort(
            @NotNull
            final UnsignedByteArray bytes); @NotNull static UnsignedByteArray from(final byte b); static byte toByte(
            @NotNull
            final UnsignedByteArray bytes); @NotNull static UnsignedByteArray from(final boolean b); static boolean toBoolean(
            @NotNull
            final UnsignedByteArray bytes); static int compare(
            @NotNull
            final Buffer left,
            final long leftFrom,
            final long leftLength,
            @NotNull
            final Buffer right); static int compare(
            @NotNull
            final Buffer left,
            @NotNull
            final Buffer right);  }
@Test public void testByteArray() { final byte[] a01 = {0, 1}; final byte[] a10 = {1, 0}; assertTrue(from(a01).compareTo(from(a10)) < 0); assertTrue(from(a01).compareTo(from(a01)) == 0); assertTrue(from(a10).compareTo(from(a10)) == 0); assertTrue(from(a10).compareTo(from(a01)) > 0); }
@Test public void testBuffer() { final byte[] data = {0, 1, 2, 3}; assertEquals(from(data), from(Buffer.from(data))); assertEquals(from(data).toByteBuffer(), Buffer.from(data)); }
@Test public void testHashCode() { assertEquals(from("").hashCode(), from("").hashCode()); assertEquals(from("a").hashCode(), from("a").hashCode()); assertNotEquals(from("a").hashCode(), from("").hashCode()); assertNotEquals(from("a").hashCode(), from("b").hashCode()); }
@Test public void iterable() { final Iterator<Byte> iter = from(new byte[]{1, 2, 3}).iterator(); assertEquals(1, iter.next().byteValue()); assertEquals(2, iter.next().byteValue()); assertEquals(3, iter.next().byteValue()); assertFalse(iter.hasNext()); }