648649650651652653654655656657658
UnitFormat unitFormat = UnitFormat.getInstance(); Unit uom = null; try { // unit of measure is meter uom = (Unit) unitFormat.parseObject("m"); } catch (ParseException ex1) { uom = null; }