Class IoCheckedBytes

  • All Implemented Interfaces:
    Bytes

    public final class IoCheckedBytes
    extends Object
    implements Bytes
    Bytes that doesn't throw checked Exception, but only throws IOException.

    There is no thread-safety guarantee.

    Since:
    0.52
    • Constructor Detail

      • IoCheckedBytes

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

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

      • asBytes

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