Package slash.navigation.nmea

Examples of slash.navigation.nmea.NmeaFormat


    @Test
    public void testCurrentStartDateForNmeaWithDate() throws Exception {
        FileInputStream source = new FileInputStream(new File(SAMPLE_PATH + "startdate-with-date.nmea"));
        Calendar startDate = Calendar.getInstance();
        ParserContext<NmeaRoute> context = new ParserContextImpl<NmeaRoute>();
        new NmeaFormat().read(source, fromCalendar(startDate), context);
        List<NmeaRoute> routes = context.getRoutes();
        checkPositions(routes);
    }
View Full Code Here


    public void testFileStartDateForNmeaWithoutDate() throws Exception {
        File source = new File(SAMPLE_PATH + "startdate-without-date.nmea");
        Calendar startDate = Calendar.getInstance();
        startDate.setTimeInMillis(source.lastModified());
        ParserContext<NmeaRoute> context = new ParserContextImpl<NmeaRoute>();
        new NmeaFormat().read(new FileInputStream(source), fromCalendar(startDate), context);
        List<NmeaRoute> routes = context.getRoutes();
        checkPositionsWithDate(routes, startDate);
    }
View Full Code Here

    @Test
    public void testCurrentStartDateForNmeaWithoutDate() throws Exception {
        FileInputStream source = new FileInputStream(new File(SAMPLE_PATH + "startdate-without-date.nmea"));
        Calendar startDate = Calendar.getInstance();
        ParserContext<NmeaRoute> context = new ParserContextImpl<NmeaRoute>();
        new NmeaFormat().read(source, fromCalendar(startDate), context);
        List<NmeaRoute> routes = context.getRoutes();
        checkPositionsWithDate(routes, startDate);
    }
View Full Code Here

            Calendar calendar = Calendar.getInstance();
            calendar.setTimeInMillis(source.lastModified());
            startDate = fromCalendar(calendar);
        }
        ParserContext<NmeaRoute> context = new ParserContextImpl<NmeaRoute>();
        new NmeaFormat().read(new FileInputStream(source), startDate, context);
        return context.getRoutes();
    }
View Full Code Here

TOP

Related Classes of slash.navigation.nmea.NmeaFormat

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.