Interface INBTReader
- All Superinterfaces:
AutoCloseable
- All Known Implementing Classes:
NBTReader
Interface for reading NBT data from files with automatic format detection.
Automatically detects and handles compression (GZIP, ZLIB, or uncompressed) and properly decodes the binary NBT format.
- Author:
- Paul Ferlitz
- See Also:
-
Method Details
-
read
Reads and parses the entire NBT file into a compound tag structure. The method automatically detects compression and handles all the binary format complexities. Since NBT files always have compound tags as roots in Java Edition, this returns anICompoundTag.- Returns:
- The root
ICompoundTagcontaining the complete NBT structure - Throws:
IOException- If the file cannot be read, is corrupted, or uses an unsupported format
-
close
Closes this reader and releases any associated system resources.- Specified by:
closein interfaceAutoCloseable- Throws:
IOException- If an error occurs during resource cleanup
-