src/main/java/com/mobiquityinc/packer/Parser.java
protected static List<Package> parseInputFile(String filePath) throws APIException {
        try {
            Scanner scanner = new Scanner(new File(filePath), "UTF-8");
            scanner.useDelimiter(System.getProperty("line.separator"));
            List<Package> result = new ArrayList<>();
            while (scanner.hasNext()) {
                String line = scanner.next();
                result.add(parsePackage(line));
            }
            return result;
        } catch (FileNotFoundException e) {
            throw new APIException(String.format("The file with the specified pathname '%s' " +
                    "does not exist or for some reason is inaccessible", filePath), e);
        }
    }
/**
     * @param filePath a path to a filename.
     *               The Java regular expression API works on the char type.
     *               If we have UTF-8 data we will need to transcode it to
     *               UTF-16 on input if this is not already being done.
     * @return list of parsed cases.
     * @throws APIException if file does not exist or for some reason is inaccessible.
     */
@param filePath a path to a filename.
The Java regular expression API works on the char type.
If we have UTF-8 data we will need to transcode it to
UTF-16 on input if this is not already being done.
@return list of parsed cases.
@throws APIException if file does not exist or for some reason is inaccessible.
@param filePath a path to a filename . The Java regular expression API works on the char type . If we have UTF - 8 data we will need to transcode it to UTF - 16 on input if this is not already being done . @return list of parsed cases . @throws APIException if file does not exist or for some reason is inaccessible .
protected static List<Package> parseInputFile(String filePath) throws APIException {
        try {
            Scanner scanner = new Scanner(new File(filePath), "UTF-8");
            scanner.useDelimiter(System.getProperty("line.separator"));
            List<Package> result = new ArrayList<>();
            while (scanner.hasNext()) {
                String line = scanner.next();
                result.add(parsePackage(line));
            }
            return result;
        } catch (FileNotFoundException e) {
            throw new APIException(String.format("The file with the specified pathname '%s' " +
                    "does not exist or for some reason is inaccessible", filePath), e);
        }
    }
protected static List < Package > parseInputFile ( String filePath ) throws APIException { try { Scanner scanner = new Scanner ( new File ( filePath ) , "UTF-8" ) ; scanner . useDelimiter ( System . getProperty ( "line.separator" ) ) ; List < Package > result = new ArrayList < > ( ) ; while ( scanner . hasNext ( ) ) { String line = scanner . next ( ) ; result . add ( parsePackage ( line ) ) ; } return result ; } catch ( FileNotFoundException e ) { throw new APIException ( String . format ( "The file with the specified pathname '%s' " + "does not exist or for some reason is inaccessible" , filePath ) , e ) ; } }
@param filePath a path to a filename.
@param filePath a path to a filename .