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>
  • Constructor Details

    • Formatter

      public Formatter()
  • Method Details

    • of

      @NonNull public static <T> @NonNull Jaxb.Formatter<T> of(@NonNull @NonNull Class<T> type)
    • of

      @NonNull public static <T> @NonNull Jaxb.Formatter<T> of(@NonNull @NonNull JAXBContext context)
    • getDefaultEncoding

      @NonNull public @NonNull Charset getDefaultEncoding()
      Specified by:
      getDefaultEncoding in interface Xml.Formatter<T>
    • formatFile

      public void formatFile(@NonNull T value, @NonNull @NonNull File target) throws IOException
      Specified by:
      formatFile in interface nbbrd.io.FileFormatter<T>
      Throws:
      IOException
    • formatWriter

      public void formatWriter(@NonNull T value, @NonNull @NonNull Writer resource) throws IOException
      Specified by:
      formatWriter in interface nbbrd.io.text.TextFormatter<T>
      Throws:
      IOException
    • formatStream

      public void formatStream(@NonNull T value, @NonNull @NonNull OutputStream resource) throws IOException
      Specified by:
      formatStream in interface nbbrd.io.FileFormatter<T>
      Throws:
      IOException
    • formatStream

      public void formatStream(@NonNull T value, @NonNull @NonNull OutputStream resource, @NonNull @NonNull Charset encoding) throws IOException
      Specified by:
      formatStream in interface nbbrd.io.text.TextFormatter<T>
      Throws:
      IOException