Package nbbrd.io.xml.bind
Class Jaxb.Formatter<T>
- java.lang.Object
-
- nbbrd.io.xml.bind.Jaxb.Formatter<T>
-
- All Implemented Interfaces:
nbbrd.io.FileFormatter<T>,nbbrd.io.text.TextFormatter<T>,Xml.Formatter<T>
- Enclosing class:
- Jaxb
public static final class Jaxb.Formatter<T> extends Object implements Xml.Formatter<T>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classJaxb.Formatter.Builder<T>
-
Constructor Summary
Constructors Constructor Description Formatter()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidformatFile(@NonNull T value, @NonNull File target)voidformatStream(@NonNull T value, @NonNull OutputStream resource)voidformatStream(@NonNull T value, @NonNull OutputStream resource, @NonNull Charset encoding)voidformatWriter(@NonNull T value, @NonNull Writer resource)@NonNull CharsetgetDefaultEncoding()static <T> @NonNull Jaxb.Formatter<T>of(@NonNull Class<T> type)static <T> @NonNull Jaxb.Formatter<T>of(@NonNull JAXBContext context)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface nbbrd.io.text.TextFormatter
formatChars, formatFile, formatPath, formatStream, formatToString, formatWriter
-
Methods inherited from interface nbbrd.io.xml.Xml.Formatter
compose, isFormatted
-
-
-
-
Method Detail
-
of
public static <T> @NonNull Jaxb.Formatter<T> of(@NonNull Class<T> type)
-
of
public static <T> @NonNull Jaxb.Formatter<T> of(@NonNull JAXBContext context)
-
getDefaultEncoding
public @NonNull Charset getDefaultEncoding()
- Specified by:
getDefaultEncodingin interfaceXml.Formatter<T>
-
formatFile
public void formatFile(@NonNull T value, @NonNull File target) throws IOException
- Specified by:
formatFilein interfacenbbrd.io.FileFormatter<T>- Throws:
IOException
-
formatWriter
public void formatWriter(@NonNull T value, @NonNull Writer resource) throws IOException
- Specified by:
formatWriterin interfacenbbrd.io.text.TextFormatter<T>- Throws:
IOException
-
formatStream
public void formatStream(@NonNull T value, @NonNull OutputStream resource) throws IOException
- Specified by:
formatStreamin interfacenbbrd.io.FileFormatter<T>- Throws:
IOException
-
formatStream
public void formatStream(@NonNull T value, @NonNull OutputStream resource, @NonNull Charset encoding) throws IOException
- Specified by:
formatStreamin interfacenbbrd.io.text.TextFormatter<T>- Throws:
IOException
-
-