Module io.jstach.jstachio
Package io.jstach.jstachio.output
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.
An OutputStream like callback.
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
accept
(byte[] data) Convenience method that will call the real accept.void
accept
(byte[] data, int offset, int length) Analagous toOutputStream.write(byte[], int, int)
.default void
close()
-
Method Details
-
accept
Convenience method that will call the real accept.- Parameters:
data
- array to be fully copied- Throws:
E
- if consumer has an error
-
accept
Analagous toOutputStream.write(byte[], int, int)
.- Parameters:
data
- dataoffset
- offsetlength
- length- Throws:
E
- if the consumer as an error
-
close
- Specified by:
close
in interfaceAutoCloseable
- Throws:
E extends Exception
-