code: public static byte[] createLengthOptimizedAPDU(final int service, final byte... asdu)
  	{
  		final byte[] apdu = new byte[(asdu != null && asdu.length > 0) ? 1 + asdu.length : 2];
  		if (apdu.length > 255)
  			throw new KNXIllegalArgumentException("APDU length exceeds maximum of 255 bytes");
  		apdu[0] = (byte) ((service >> 8) & 0x03);
  		apdu[1] = (byte) service;
  		if (asdu != null && asdu.length > 0) {
  			// maximum of 6 bits in asdu[0] are valid
  			apdu[1] |= asdu[0] & 0x3F;
  			for (int i = 1; i < asdu.length; ++i)
  				apdu[i + 1] = asdu[i];
  		}
  		return apdu;
  	}
docs: Creates a length-optimized application layer protocol data unit out of a service
  code and a service data unit.
  <p>
  The transport layer bits in the first byte (TL / AL control field) are set 0. If the compact
  APDU shall not contain any ASDU information, <code>asdu</code> can be left <code>null</code>.
  
  @param service application layer service code
  @param asdu application layer service data unit, <code>asdu.length</code> &lt; 255; or
  <code>null</code> for no ASDU
  @return APDU as byte array