Package nbbrd.io.text
Interface TextFormatter<T>
-
public interface TextFormatter<T>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default <V> @NonNull TextFormatter<V>compose(@NonNull Function<? super V,? extends T> before)default voidformatChars(@NonNull T value, @NonNull Appendable target)default voidformatFile(@NonNull T value, @NonNull File target, @NonNull Charset encoding)default voidformatPath(@NonNull T value, @NonNull Path target, @NonNull Charset encoding)voidformatStream(@NonNull T value, @NonNull OutputStream resource, @NonNull Charset encoding)default voidformatStream(@NonNull T value, IOSupplier<? extends OutputStream> target, @NonNull Charset encoding)default @NonNull StringformatToString(@NonNull T value)voidformatWriter(@NonNull T value, @NonNull Writer resource)default voidformatWriter(@NonNull T value, IOSupplier<? extends Writer> target)
-
-
-
Method Detail
-
formatToString
default @NonNull String formatToString(@NonNull T value) throws IOException
- Throws:
IOException
-
formatChars
default void formatChars(@NonNull T value, @NonNull Appendable target) throws IOException
- Throws:
IOException
-
formatFile
default void formatFile(@NonNull T value, @NonNull File target, @NonNull Charset encoding) throws IOException
- Throws:
IOException
-
formatPath
default void formatPath(@NonNull T value, @NonNull Path target, @NonNull Charset encoding) throws IOException
- Throws:
IOException
-
formatWriter
default void formatWriter(@NonNull T value, IOSupplier<? extends Writer> target) throws IOException
- Throws:
IOException
-
formatStream
default void formatStream(@NonNull T value, IOSupplier<? extends OutputStream> target, @NonNull Charset encoding) throws IOException
- Throws:
IOException
-
formatWriter
void formatWriter(@NonNull T value, @NonNull Writer resource) throws IOException
- Throws:
IOException
-
formatStream
void formatStream(@NonNull T value, @NonNull OutputStream resource, @NonNull Charset encoding) throws IOException
- Throws:
IOException
-
compose
default <V> @NonNull TextFormatter<V> compose(@NonNull Function<? super V,? extends T> before)
-
-