class ByteConverter implements PropertyConverter<Byte> {

    @Override
    public Byte convert(String value, ConversionContext ctx) {
        ctx.addSupportedFormats(getClass(),"<byte>", "MIN_VALUE", "MIN", "MAX_VALUE", "MAX");
        if(value==null){
            return null;
        }
        String trimmed = value.trim();
        switch(trimmed.toUpperCase(Locale.ENGLISH)){
            case "MIN_VALUE":
            case "MIN":
                return Byte.MIN_VALUE;
            case "MAX_VALUE":
            case "MAX":
                return Byte.MAX_VALUE;
            default:
                try {
                    return Byte.decode(trimmed);
                } catch(Exception e) {
                    LOG.log(Level.FINEST, "Unparseable Byte: " + value);
                    return null;
                }
        }
    }

}