Class BinaryFormat

java.lang.Object
dev.siroshun.configapi.format.binary.BinaryFormat
All Implemented Interfaces:
dev.siroshun.configapi.core.file.FileFormat<dev.siroshun.configapi.core.node.Node<?>>

@NotNullByDefault public final class BinaryFormat extends Object implements dev.siroshun.configapi.core.file.FileFormat<dev.siroshun.configapi.core.node.Node<?>>
A FileFormat implementation that loading/saving MapNode from/to binary format.

Supported Nodes:

  • ValueNodes excluding EnumValue
  • ArrayNode, ListNode and MapNode
  • NullNode
  • CommentedNode - The comment will be dropped

For specifications of this format, please see the comments in the source code.

  • Field Details

  • Method Details

    • load

      public dev.siroshun.configapi.core.node.Node<?> load(Path filepath) throws IOException
      Specified by:
      load in interface dev.siroshun.configapi.core.file.FileFormat<dev.siroshun.configapi.core.node.Node<?>>
      Throws:
      IOException
    • load

      public dev.siroshun.configapi.core.node.Node<?> load(InputStream input) throws IOException
      Specified by:
      load in interface dev.siroshun.configapi.core.file.FileFormat<dev.siroshun.configapi.core.node.Node<?>>
      Throws:
      IOException
    • save

      public void save(dev.siroshun.configapi.core.node.Node<?> node, Path filepath) throws IOException
      Specified by:
      save in interface dev.siroshun.configapi.core.file.FileFormat<dev.siroshun.configapi.core.node.Node<?>>
      Throws:
      IOException
    • save

      public void save(dev.siroshun.configapi.core.node.Node<?> node, OutputStream output) throws IOException
      Specified by:
      save in interface dev.siroshun.configapi.core.file.FileFormat<dev.siroshun.configapi.core.node.Node<?>>
      Throws:
      IOException
    • load

      @Deprecated public dev.siroshun.configapi.core.node.Node<?> load(Reader reader)
      Deprecated.
      Not supported
      Specified by:
      load in interface dev.siroshun.configapi.core.file.FileFormat<dev.siroshun.configapi.core.node.Node<?>>
    • save

      @Deprecated public void save(dev.siroshun.configapi.core.node.Node<?> node, Writer writer)
      Deprecated.
      Not supported
      Specified by:
      save in interface dev.siroshun.configapi.core.file.FileFormat<dev.siroshun.configapi.core.node.Node<?>>