FIT developer fields decoding example code

This is a Java code example that loads a FIT file, decodes it and prints info on developer fields to console:

Example code

Usage:

byte[] bytes = Files.readAllBytes(Paths.get("c:/workout.fit"));
SuuntoDeveloperFieldsDecodingExample.decode(bytes, System.out);

Example console output:

App 0 = App[type=SUUNTOPLUS_METADATA, name='null']
App 1 = App[type=SUUNTO_STANDARD, name='null']
App 2 = App[type=SUUNTOPLUS, name='zztrph01']
Field 0_0 = Field[app=App[type=SUUNTOPLUS_METADATA, name='null'], fieldName='suuntoplus_field_label', unit='null', label='null', format='null']
Field 0_1 = Field[app=App[type=SUUNTOPLUS_METADATA, name='null'], fieldName='suuntoplus_field_format', unit='null', label='null', format='null']
Field 0_2 = Field[app=App[type=SUUNTOPLUS_METADATA, name='null'], fieldName='suuntoplus_plugin_owner_id', unit='null', label='null', format='null']
Field 0_3 = Field[app=App[type=SUUNTOPLUS_METADATA, name='null'], fieldName='suuntoplus_plugin_external_id', unit='null', label='null', format='null']
Field 1_0 = Field[app=App[type=SUUNTO_STANDARD, name='null'], fieldName='feeling', unit='null', label='null', format='null']
Field 1_2 = Field[app=App[type=SUUNTO_STANDARD, name='null'], fieldName='recovery_time', unit='s', label='null', format='null']
Field 1_4 = Field[app=App[type=SUUNTO_STANDARD, name='null'], fieldName='peak_epoc', unit='l/kg', label='null', format='null']
Field 2_0 = Field[app=App[type=SUUNTOPLUS, name='zztrph01'], fieldName='hrtss', unit='null', label='hrTSS', format='Count_Fourdigits']
Session Field[app=App[type=SUUNTO_STANDARD, name='null'], fieldName='recovery_time', unit='s', label='null', format='null'] = 22440
Session Field[app=App[type=SUUNTO_STANDARD, name='null'], fieldName='peak_epoc', unit='l/kg', label='null', format='null'] = 38.2
Session Field[app=App[type=SUUNTO_STANDARD, name='null'], fieldName='feeling', unit='null', label='null', format='null'] = 4
Session Field[app=App[type=SUUNTOPLUS_METADATA, name='null'], fieldName='suuntoplus_plugin_owner_id', unit='null', label='null', format='null'] = 828aecbc-0682-4576-9c87-5c0882760e44
Session Field[app=App[type=SUUNTOPLUS_METADATA, name='null'], fieldName='suuntoplus_plugin_external_id', unit='null', label='null', format='null'] = 61436b0c8a885ea1f4ed5351
Session Field[app=App[type=SUUNTOPLUS, name='zztrph01'], fieldName='hrtss', unit='null', label='hrTSS', format='Count_Fourdigits'] = 27.916609

Requires the FIT SDK.