Package com.vtence.molecule.http

Examples of com.vtence.molecule.http.ContentType


    public Iterable<Cookie> cookies() {
        return new ArrayList<Cookie>(cookies.values());
    }

    public Charset charset() {
        ContentType contentType = ContentType.of(this);
        if (contentType == null || contentType.charset() == null) {
            return Charsets.ISO_8859_1;
        }
        return contentType.charset();
    }
View Full Code Here


    public String body() throws IOException {
        return Streams.toString(input, charset());
    }

    public Charset charset() {
        ContentType contentType = ContentType.of(this);
        if (contentType == null || contentType.charset() == null) {
            return Charsets.ISO_8859_1;
        }
        return contentType.charset();
    }
View Full Code Here

        String value = header(HeaderNames.CONTENT_LENGTH);
        return value != null ? parseLong(value) : -1;
    }

    public String contentType() {
        ContentType contentType = ContentType.of(this);
        return contentType != null ? contentType.mediaType() : null;
    }
View Full Code Here

TOP

Related Classes of com.vtence.molecule.http.ContentType

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.