Search in sources :

Example 1 with Encoding

use of org.restlet.data.Encoding in project GeoGig by boundlessgeo.

the class FixedEncoder method encode.

@Override
public Representation encode(ClientInfo client, Representation representation) {
    Representation result = representation;
    Encoding bestEncoding = getBestEncoding(client);
    if (bestEncoding != null && !Encoding.IDENTITY.equals(bestEncoding)) {
        result = new FixedEncoderRepresentation(bestEncoding, representation);
    }
    return result;
}
Also used : EncodeRepresentation(com.noelios.restlet.application.EncodeRepresentation) Representation(org.restlet.resource.Representation) Encoding(org.restlet.data.Encoding)

Aggregations

EncodeRepresentation (com.noelios.restlet.application.EncodeRepresentation)1 Encoding (org.restlet.data.Encoding)1 Representation (org.restlet.resource.Representation)1