@Throws(IOException::class) fun write(out: OutStream) { out.flushBits() out.writeUBits(5, getBitSize()) out.writeSBits(bitSize, minX) out.writeSBits(bitSize, maxX  out.writeSBits(bitSize, minY) out.writeSBits(bitSize, maxY) out.flushBits() }
Write the rect contents to the output stream