Module syntaxnbt

Class RegionUtil

java.lang.Object
at.syntaxerror.syntaxnbt.internal.RegionUtil

public final class RegionUtil extends Object
A utility class for reading and writing region files
Author:
SyntaxError404
  • Method Details

    • serialize

      public static void serialize(Region region, RandomAccessFile output) throws IOException
      Writes a region to a stream
      Parameters:
      region - region to be serialized
      output - stream to write to
      Throws:
      IOException - if an I/O error occured
    • deserialize

      public static Region deserialize(RandomAccessFile input) throws IOException
      Reads a region from a stream (NBT format)
      Parameters:
      input - stream to read to
      Returns:
      the deserialized region
      Throws:
      IOException - if an I/O error occured