com.swak.license.api.Codec Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of swak-license-core Show documentation
Show all versions of swak-license-core Show documentation
swak component of trueLicense core
The newest version!
/*
* Copyright (C) 2005 - 2019 Schlichtherle IT Services.
* All rights reserved. Use is subject to license terms.
*/
package com.swak.license.api;
/** Provides encoders and decoders for generic object graphs. */
public interface Codec extends com.swak.license.api.io.Codec {
/**
* Returns an identifier for the content type used by this codec.
* The returned string must conform to the syntax specified in
* RFC2045
* "Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies",
* Section 5.1
* "Syntax of the Content-Type Header Field",
* except that it must not start with "Content-Type:"
* and optional spaces, i.e. the field name must be stripped.
*/
String contentType();
/**
* Returns an identifier for the content transfer encoding used by this
* codec.
* The returned string must conform to the syntax specified in
* RFC2045
* "Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies",
* Section 6.1
* "Content-Transfer-Encoding Syntax",
* except that it must not start with "Content-Transfer-Encoding:"
* and optional spaces, i.e. the field name must be stripped.
*
* If the Content-Transfer-Encoding equals (ignoring case) {@code "8bit"}
* and the {@linkplain #contentType Content-Type} does not specify a
* {@code charset} parameter, then {@code UTF-8} is assumed as the charset.
*/
String contentTransferEncoding();
}