Package net.sf.myway.gps.garmin.mapping.converters

Examples of net.sf.myway.gps.garmin.mapping.converters.Converter


      final String fieldLength = fld.attributeValue("length");
      final Object fieldData = getFieldData(data, fieldName);
      LOG.debug(fieldName + " -> " + fieldData);
      if (fieldOffset != null)
        pos = offset + Integer.parseInt(fieldOffset);
      final Converter conv = _converters.get(fieldType);
      if (conv == null) {
        LOG.error("no converter for " + fieldType);
        continue;
      }
      if (fieldData != null)
        pos =
          conv.convert(buffer, pos, fieldData,
            fieldLength == null ? 0 : Integer.parseInt(fieldLength));
    }
    return sizeVal == null ? pos : offset + Integer.parseInt(sizeVal);
  }
View Full Code Here


      final String fieldType = fld.attributeValue("type");
      final String fieldOffset = fld.attributeValue("offset");
      final String fieldLength = fld.attributeValue("length");
      if (fieldOffset != null)
        pos = offset + Integer.parseInt(fieldOffset);
      final Converter conv = _converters.get(fieldType);
      if (conv == null) {
        LOG.error("no converter for " + fieldType);
        continue;
      }
      final Object fieldData =
        conv.convert(data, pos, fieldLength == null ? 0 : Integer.parseInt(fieldLength),
          ppos);
      pos = ppos.getIndex();
      if (fieldData != null && fieldName != null)
        setFieldData(obj, fieldData, fieldName);
      LOG.debug(fieldName + " -> " + fieldData);
View Full Code Here

TOP

Related Classes of net.sf.myway.gps.garmin.mapping.converters.Converter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.