// Path: src/jdbpfx/properties/DBPFPropertyType.java
// public enum DBPFPropertyType {
//     UINT8  ((short) 0x0100, "Uint8", 1),
//     UINT16 ((short) 0x0200, "Uint16", 2),
//     UINT32 ((short) 0x0300, "Uint32", 4),
//     SINT32 ((short) 0x0700, "Sint32", 4),
//     SINT64 ((short) 0x0800, "Sint64", 8),
//     FLOAT32((short) 0x0900, "Float32", 4),
//     BOOL   ((short) 0x0B00, "Bool", 1),
//     STRING ((short) 0x0C00, "String", 1);
// 
//     /** A map of data type IDs ({@link #id}) to PropertyType constants. */
//     public static final Map<Short, DBPFPropertyType> forID;
// 
//     static {
//         HashMap<Short, DBPFPropertyType> modifiable = new HashMap<Short, DBPFPropertyType>(
//                 DBPFPropertyType.values().length);
// 
//         for (DBPFPropertyType type : DBPFPropertyType.values())
//             modifiable.put(type.id, type);
// 
//         forID = Collections.unmodifiableMap(modifiable);
//     }
// 
//     public final short id;
//     public final String name;
//     public final int length;
// 
//     private DBPFPropertyType(short id, String name, int length) {
//         this.id = id;
//         this.name = name;
//         this.length = length;
//     }
// 
//     @Override
//     public String toString() {
//         return name;
//     }
// }


import java.text.DecimalFormat;
import java.text.DecimalFormatSymbols;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Locale;
import java.util.logging.Logger;
import jdbpfx.properties.DBPFPropertyType;
        long result = 0;
        hexString = hexString.toLowerCase();
        if (hexString.startsWith("0x")) {
            hexString = hexString.substring(2);
        }
        result = Long.parseLong(hexString, 16);
        if(signed) {
            long signBit = 1L << ((hexString.length() * 4) - 1);
            if((result & signBit) == signBit) {
                result |= ~(signBit * 2 - 1);
            }
        }
        return result;
    }

    /**
     * Reads a value till length reached.<br>
     *
     * @param type
     *            PropertyType.SINT32 or PropertyType.SINT64 for signed values;
     *            Otherwise for unsigned
     * @param data
     *            The data
     * @param start
     *            The start offset
     * @param length
     *            The length
     *
     * @return A long value
     */
// Path: src/jdbpfx/properties/DBPFPropertyType.java
// public enum DBPFPropertyType {
//     UINT8  ((short) 0x0100, "Uint8", 1),
//     UINT16 ((short) 0x0200, "Uint16", 2),
//     UINT32 ((short) 0x0300, "Uint32", 4),
//     SINT32 ((short) 0x0700, "Sint32", 4),
//     SINT64 ((short) 0x0800, "Sint64", 8),
//     FLOAT32((short) 0x0900, "Float32", 4),
//     BOOL   ((short) 0x0B00, "Bool", 1),
//     STRING ((short) 0x0C00, "String", 1);
// 
//     /** A map of data type IDs ({@link #id}) to PropertyType constants. */
//     public static final Map<Short, DBPFPropertyType> forID;
// 
//     static {
//         HashMap<Short, DBPFPropertyType> modifiable = new HashMap<Short, DBPFPropertyType>(
//                 DBPFPropertyType.values().length);
// 
//         for (DBPFPropertyType type : DBPFPropertyType.values())
//             modifiable.put(type.id, type);
// 
//         forID = Collections.unmodifiableMap(modifiable);
//     }
// 
//     public final short id;
//     public final String name;
//     public final int length;
// 
//     private DBPFPropertyType(short id, String name, int length) {
//         this.id = id;
//         this.name = name;
//         this.length = length;
//     }
// 
//     @Override
//     public String toString() {
//         return name;
//     }
// }


// Path: src/jdbpfx/util/DBPFUtil.java
import java.text.DecimalFormat;
import java.text.DecimalFormatSymbols;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Locale;
import java.util.logging.Logger;
import jdbpfx.properties.DBPFPropertyType;

        long result = 0;
        hexString = hexString.toLowerCase();
        if (hexString.startsWith("0x")) {
            hexString = hexString.substring(2);
        }
        result = Long.parseLong(hexString, 16);
        if(signed) {
            long signBit = 1L << ((hexString.length() * 4) - 1);
            if((result & signBit) == signBit) {
                result |= ~(signBit * 2 - 1);
            }
        }
        return result;
    }

    /**
     * Reads a value till length reached.<br>
     *
     * @param type
     *            PropertyType.SINT32 or PropertyType.SINT64 for signed values;
     *            Otherwise for unsigned
     * @param data
     *            The data
     * @param start
     *            The start offset
     * @param length
     *            The length
     *
     * @return A long value
     */
    public static long getValue(DBPFPropertyType type, byte[] data, int start, int length) {