All Downloads are FREE. Search and download functionalities are using the official Maven repository.

uk.co.autotrader.traverson.http.TextBody Maven / Gradle / Ivy

Go to download

The kernel of traverson4j. This provides the main API for a client to traverse a Hypermedia REST service

The newest version!
package uk.co.autotrader.traverson.http;

import java.nio.charset.Charset;

public class TextBody implements Body {
    private final String data;
    private final String contentType;
    private final Charset charset;

    public TextBody(String data, String contentType) {
        this(data, contentType, null);
    }

    public TextBody(String data, String contentType, Charset charset) {
        this.data = data;
        this.contentType = contentType;
        this.charset = charset;
    }

    @Override
    public String getContent() {
        return data;
    }

    @Override
    public String getContentType() {
        return contentType;
    }

    public Charset getCharset() {
        return charset;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy