@Override
	public void decode(final ByteBuffer buf, final int available, final StringBuilder log) throws Exception
	{
		final int len = buf.get() & 0x7F;
		if (len > available-1)
			throw new Exception("String length of " + len + " exceeds remaining data (" + (available-1) + " bytes)");
		final byte[] raw = new byte[len];
		buf.get(raw);
		value = new String(raw);
		if (log != null)
			log.append("String value      : ").append(value).append("\n");
		
		// Skip remaining bytes
		final int rest = available - 1 - len;
		if (rest > 0)
			buf.position(buf.position() + rest);
	}