@Override
    public void decode(final ByteBuffer buf, final int available, final StringBuilder log)
            throws Exception
    {
        final int start = buf.position();

        // Count
        final short count = buf.getShort();
        if (log != null)
            log.append("UINT count              : ").append(count).append("\n");

        // Offset table
        final short[] offset = new short[count];
        for (int i=0; i<count; ++i)
        {
            offset[i] = buf.getShort();
            if (log != null)
                log.append("UINT offset             : ").append(offset[i]).append("\n");
        }
        
        // Individual replies
        for (int i=0; i<count; ++i)
        {   // Track buffer offset from start
            final int off = buf.position() - start;
            if (off != offset[i])
                throw new Exception("Expected response #" + (i+1) + " at offset " + offset[i] + ", not " + off);
            
            // Determine length of this section
            final int section_length;
            if (i < count-1)
                section_length = offset[i+1] - off;     // .. from offset table
            else
                section_length = available - offset[i]; // .. from distance to end for last section
        
            if (log != null)
                log.append("    \\/\\/ response ").append(i+1).append(" \\/\\/ (offset ").append(off).append(" bytes)\n");
            services[i].decode(buf, section_length, log);
            if (log != null)
                log.append("    /\\/\\ response ").append(i+1).append(" /\\/\\\n");
        }
    }