Package org.jaudiotagger.tag

Examples of org.jaudiotagger.tag.FieldDataInvalidException


        switch (values.length) {
            case 1:
                try {
                    numbers.add(Short.parseShort(values[0]));
                } catch (NumberFormatException nfe) {
                    throw new FieldDataInvalidException("Value of:" + values[0] + " is invalid for field:" + id);
                }
                numbers.add(new Short("0"));
                numbers.add(new Short("0"));
                break;

            case 2:
                try {
                    numbers.add(Short.parseShort(values[0]));
                } catch (NumberFormatException nfe) {
                    throw new FieldDataInvalidException("Value of:" + values[0] + " is invalid for field:" + id);
                }
                try {
                    numbers.add(Short.parseShort(values[1]));
                } catch (NumberFormatException nfe) {
                    throw new FieldDataInvalidException("Value of:" + values[1] + " is invalid for field:" + id);
                }
                numbers.add(new Short("0"));
                break;

            default:
                throw new FieldDataInvalidException("Value is invalid for field:" + id);
        }
    }
View Full Code Here


        //Check that can actually be stored numercially, otherwise will have big problems
        //when try and save the field
        try {
            Long.parseLong(value);
        } catch (NumberFormatException nfe) {
            throw new FieldDataInvalidException("Value of:" + value + " is invalid for field:" + id);
        }
    }
View Full Code Here

            case 1:

                try {
                    numbers.add(Short.parseShort(values[0]));
                } catch (NumberFormatException nfe) {
                    throw new FieldDataInvalidException("Value of:" + values[0] + " is invalid for field:" + id);
                }
                numbers.add(new Short("0"));
                break;

            case 2:
                try {
                    numbers.add(Short.parseShort(values[0]));
                } catch (NumberFormatException nfe) {
                    throw new FieldDataInvalidException("Value of:" + values[0] + " is invalid for field:" + id);
                }
                try {
                    numbers.add(Short.parseShort(values[1]));
                } catch (NumberFormatException nfe) {
                    throw new FieldDataInvalidException("Value of:" + values[1] + " is invalid for field:" + id);
                }
                break;

            default:
                throw new FieldDataInvalidException("Value is invalid for field:" + id);
        }
    }
View Full Code Here

TOP

Related Classes of org.jaudiotagger.tag.FieldDataInvalidException

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.