Interface OutputConsumer<E extends Exception>

Type Parameters:
E - exception that could be thrown while accepting byte data.
All Superinterfaces:
AutoCloseable
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface OutputConsumer<E extends Exception> extends AutoCloseable
An OutputStream like callback.
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    accept(byte[] data)
    Convenience method that will call the real accept.
    void
    accept(byte[] data, int offset, int length)
    default void
     
  • Method Details

    • accept

      default void accept(byte[] data) throws E
      Convenience method that will call the real accept.
      Parameters:
      data - array to be fully copied
      Throws:
      E - if consumer has an error
    • accept

      void accept(byte[] data, int offset, int length) throws E
      Parameters:
      data - data
      offset - offset
      length - length
      Throws:
      E - if the consumer as an error
    • close

      default void close() throws E
      Specified by:
      close in interface AutoCloseable
      Throws:
      E extends Exception