Class UncheckedBytes

  • All Implemented Interfaces:
    Bytes

    public final class UncheckedBytes
    extends Object
    implements Bytes
    Bytes that doesn't throw checked Exception.

    There is no thread-safety guarantee.

    Since:
    0.3
    • Constructor Detail

      • UncheckedBytes

        public UncheckedBytes​(Bytes bts)
        Ctor.
        Parameters:
        bts - Encapsulated bytes
      • UncheckedBytes

        public UncheckedBytes​(Bytes bts,
                              Fallback<byte[]> fbk)
        Ctor.
        Parameters:
        bts - Encapsulated bytes
        fbk - Fallback
        Since:
        0.5
    • Method Detail

      • asBytes

        public byte[] asBytes()
        Description copied from interface: Bytes
        Convert it to the byte array.
        Specified by:
        asBytes in interface Bytes
        Returns:
        The byte array