Package nbbrd.io.xml.bind
Class Jaxb.Formatter<T>
- java.lang.Object
-
- nbbrd.io.xml.bind.Jaxb.Formatter<T>
-
- All Implemented Interfaces:
FileFormatter<T>,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 static <T> @NonNull Jaxb.Formatter.Builder<T>builder()voidformatFile(T value, File target)voidformatStream(T value, OutputStream resource)voidformatStream(T value, OutputStream resource, Charset encoding)voidformatWriter(T value, Writer resource)CharsetgetDefaultEncoding()static <T> @NonNull Jaxb.Formatter<T>of(@NonNull Class<T> type)static <T> @NonNull Jaxb.Formatter<T>of(@NonNull javax.xml.bind.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.FileFormatter
formatPath, formatStream
-
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) throws IOException
- Throws:
IOException
-
of
public static <T> @NonNull Jaxb.Formatter<T> of(@NonNull javax.xml.bind.JAXBContext context) throws IOException
- Throws:
IOException
-
builder
public static <T> @NonNull Jaxb.Formatter.Builder<T> builder()
-
getDefaultEncoding
public Charset getDefaultEncoding()
- Specified by:
getDefaultEncodingin interfaceXml.Formatter<T>
-
formatFile
public void formatFile(T value, File target) throws IOException
- Specified by:
formatFilein interfaceFileFormatter<T>- Throws:
IOException
-
formatWriter
public void formatWriter(T value, Writer resource) throws IOException
- Specified by:
formatWriterin interfaceTextFormatter<T>- Throws:
IOException
-
formatStream
public void formatStream(T value, OutputStream resource) throws IOException
- Specified by:
formatStreamin interfaceFileFormatter<T>- Throws:
IOException
-
formatStream
public void formatStream(T value, OutputStream resource, Charset encoding) throws IOException
- Specified by:
formatStreamin interfaceTextFormatter<T>- Throws:
IOException
-
-