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