Package nbbrd.io
Interface FileFormatter<T>
public interface FileFormatter<T>
-
Method Summary
Modifier and TypeMethodDescriptiondefault <V> @NonNull FileFormatter<V>default voidformatFile(@NonNull T value, @NonNull File target) default voidformatPath(@NonNull T value, @NonNull Path target) voidformatStream(@NonNull T value, @NonNull OutputStream resource) default voidformatStream(@NonNull T value, @NonNull IOSupplier<? extends OutputStream> target) static <T> @NonNull FileFormatter<T>onFormattingGzip(@NonNull FileFormatter<T> formatter) static <T> @NonNull FileFormatter<T>onFormattingStream(@NonNull IOBiConsumer<? super T, ? super OutputStream> function)
-
Method Details
-
formatFile
- Throws:
IOException
-
formatPath
- Throws:
IOException
-
formatStream
default void formatStream(@NonNull T value, @NonNull IOSupplier<? extends OutputStream> target) throws IOException - Throws:
IOException
-
formatStream
- Throws:
IOException
-
compose
-
onFormattingStream
static <T> @NonNull FileFormatter<T> onFormattingStream(@NonNull IOBiConsumer<? super T, ? super OutputStream> function) -
onFormattingGzip
-