@Throws(Exception::class) protected fun parse(stream: DataInputStream) { var size: Int = stream.readInt() var ret: Int var read = 0 data = ByteArray(size) while (size > 0) { ret = stream.read(data, read, size) size -= ret read += ret } }
Loading method . ( see NBT_Tag )