code: public static DPTXlator createTranslator(final int mainNumber, final int subNumber, final byte... data)
  		throws KNXException
  	{
  		final MainType type = map.get(mainNumber);
  		if (type == null)
  			throw new KNXException("no DPT translator available for main number " + mainNumber);
  
  		final boolean withSub = subNumber != 0;
  		final String id = withSub ? String.format("%d.%03d", mainNumber, subNumber)
  				: type.getSubTypes().keySet().iterator().next();
  		final DPTXlator t = type.createTranslator(id);
  		t.setAppendUnit(withSub);
  		if (data.length > 0)
  			t.setData(data);
  		return t;
  	}
docs: Creates a DPT translator for the given datapoint type main/sub number.
  
  @param mainNumber datapoint type main number, 0 &lt; mainNumber
  @param subNumber datapoint type sub number selecting a particular kind of value translation; use 0 to request any
  type ID of that translator (in that case, appending the physical unit for string values is disabled)
  @param data (optional) KNX datapoint data to set in the created translator for translation
  @return the new {@link DPTXlator} object
  @throws KNXException if no matching DPT translator is available or creation failed (see
  {@link MainType#createTranslator(String)})