Package org.asynchttpclient.date.RFC2616Date

Examples of org.asynchttpclient.date.RFC2616Date.Builder


    private RFC2616Date buildDate(Tokens tokens) {

        // Sun, 06 Nov 1994 08:49:37 GMT

        Builder dateBuilder = new Builder();

        if (isValidDayOfMonth(tokens.starts[1], tokens.ends[1], dateBuilder) && //
                isValidMonth(tokens.starts[2], tokens.ends[2], dateBuilder) && //
                isValidYear(tokens.starts[3], tokens.ends[3], dateBuilder) && //
                isValidHour(tokens.starts[4], tokens.ends[4], dateBuilder) && //
                isValidMinuteSecond(tokens.starts[5], tokens.ends[5], dateBuilder, true) && //
                isValidMinuteSecond(tokens.starts[6], tokens.ends[6], dateBuilder, false)) {
            return dateBuilder.build();
        }

        return null;
    }
View Full Code Here


    private RFC2616Date buildANSICDate(Tokens tokens) {

        // Sun Nov 6 08:49:37 1994

        Builder dateBuilder = new Builder();

        if (isValidMonth(tokens.starts[1], tokens.ends[1], dateBuilder) && //
                isValidDayOfMonth(tokens.starts[2], tokens.ends[2], dateBuilder) && //
                isValidHour(tokens.starts[3], tokens.ends[3], dateBuilder) && //
                isValidMinuteSecond(tokens.starts[4], tokens.ends[4], dateBuilder, true) && //
                isValidMinuteSecond(tokens.starts[5], tokens.ends[5], dateBuilder, false) && //
                isValidYear(tokens.starts[6], tokens.ends[6], dateBuilder)) {
            return dateBuilder.build();
        }

        return null;
    }
View Full Code Here

TOP

Related Classes of org.asynchttpclient.date.RFC2616Date.Builder

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.