Class NBTReader

java.lang.Object
org.mattrick.enbeet.io.NBTReader

public class NBTReader extends Object
Reads an NBTCompound from an InputStream. Automatically decompresses data that is gzipped.
  • Constructor Details

    • NBTReader

      public NBTReader(InputStream in) throws IOException
      Creates an NBTReader using the specified InputStream. Will attempt to ungzip compressed data, otherwise it will not perform any decompression.
      Parameters:
      in - The InputStream.
      Throws:
      IOException - if there was an error ungzipping the data.
  • Method Details

    • read

      public NBTCompound read() throws IOException
      Read the NBTCompound from the InputStream.
      Returns:
      The NBT Compound that was read.
      Throws:
      IOException - if there was an issue with reading the NBTCompound.