Class NBTWriter


  • public class NBTWriter
    extends java.lang.Object
    Class for writing NBT structures as NBT, JSON, or XML.
    • Constructor Summary

      Constructors 
      Constructor Description
      NBTWriter​(java.io.File file)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void writeJSON​(NBT<?> root)
      Writes the tag specified and its children as JSON text.
      void writeNBT​(NBT<?> root)
      Writes the tag specified and its children as NBT binary data.
      void writeNBT​(NBT<?> root, boolean compressed)  
      void writeXML​(NBT<?> root)
      Writes the tag specified and its children as XML text.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • NBTWriter

        public NBTWriter​(java.io.File file)
                  throws java.io.FileNotFoundException
        Throws:
        java.io.FileNotFoundException
    • Method Detail

      • writeJSON

        public void writeJSON​(NBT<?> root)
        Writes the tag specified and its children as JSON text.
      • writeNBT

        public void writeNBT​(NBT<?> root)
        Writes the tag specified and its children as NBT binary data.
      • writeNBT

        public void writeNBT​(NBT<?> root,
                             boolean compressed)
      • writeXML

        public void writeXML​(NBT<?> root)
        Writes the tag specified and its children as XML text.