Minecraft wiki entry for Example_NBT_Class, associated text: This Java class will read an NBT structure and return the topmost tag from an InputStream and let you write an NBT structure through the topmost tag to an OutputStream. A condensed documentation is at the bottom of the page.