Class BedrockLevelDatFormat

java.lang.Object
net.lenni0451.imnbt.types.formats.BedrockLevelDatFormat
All Implemented Interfaces:
ICustomFormat

public class BedrockLevelDatFormat extends Object implements ICustomFormat
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    detect(byte[] data)
    Detect if the data is in this custom format.
    The data may have any length, checking the length is recommended.
    Read the custom data from the input.
    The input is in the correct endianess and decompressed if needed.
    void
    write(DataOutput out, byte[] data)
    Write the custom data to the output.
    The output is in the correct endianess and compressed if needed.
    It is required to write the data as it is the serialized nbt data.

    Methods inherited from class java.lang.Object

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

    • BedrockLevelDatFormat

      public BedrockLevelDatFormat()
  • Method Details

    • detect

      public boolean detect(byte[] data)
      Description copied from interface: ICustomFormat
      Detect if the data is in this custom format.
      The data may have any length, checking the length is recommended.
      Specified by:
      detect in interface ICustomFormat
      Parameters:
      data - The data to check
      Returns:
      If the data is in this custom format
    • read

      public DataInput read(DataInput in) throws IOException
      Description copied from interface: ICustomFormat
      Read the custom data from the input.
      The input is in the correct endianess and decompressed if needed.
      Specified by:
      read in interface ICustomFormat
      Parameters:
      in - The input to read from
      Returns:
      The new input to read the nbt data from
      Throws:
      IOException - If an I/O error occurs
    • write

      public void write(DataOutput out, byte[] data) throws IOException
      Description copied from interface: ICustomFormat
      Write the custom data to the output.
      The output is in the correct endianess and compressed if needed.
      It is required to write the data as it is the serialized nbt data.
      Specified by:
      write in interface ICustomFormat
      Parameters:
      out - The output to write to
      data - The data to write
      Throws:
      IOException - If an I/O error occurs