org.restlet.data
Class Encoding

java.lang.Object
  extended by org.restlet.data.Metadata
      extended by org.restlet.data.Encoding

public final class Encoding
extends Metadata

Modifier of a representation's media type. Useful to apply compression without losing the identity of the underlying media type.

Author:
Jerome Louvel

Field Summary
static Encoding ALL
          All encodings acceptable.
static Encoding COMPRESS
          The common Unix file compression.
static Encoding DEFLATE
          The zlib format defined by RFC 1950 and 1951.
static Encoding FREEMARKER
          The FreeMarker encoding.
static Encoding GZIP
          The GNU Zip encoding.
static Encoding IDENTITY
          The default (identity) encoding.
static Encoding VELOCITY
          The Velocity encoding.
static Encoding ZIP
          The Info-Zip encoding.
 
Constructor Summary
Encoding(java.lang.String name)
          Constructor.
Encoding(java.lang.String name, java.lang.String description)
          Constructor.
 
Method Summary
 boolean equals(java.lang.Object object)
          
 int hashCode()
          
static Encoding valueOf(java.lang.String name)
          Returns the encoding associated to a name.
 
Methods inherited from class org.restlet.data.Metadata
getDescription, getName, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

ALL

public static final Encoding ALL
All encodings acceptable.


GZIP

public static final Encoding GZIP
The GNU Zip encoding.


ZIP

public static final Encoding ZIP
The Info-Zip encoding.


COMPRESS

public static final Encoding COMPRESS
The common Unix file compression.


DEFLATE

public static final Encoding DEFLATE
The zlib format defined by RFC 1950 and 1951.


IDENTITY

public static final Encoding IDENTITY
The default (identity) encoding.


FREEMARKER

public static final Encoding FREEMARKER
The FreeMarker encoding.


VELOCITY

public static final Encoding VELOCITY
The Velocity encoding.

Constructor Detail

Encoding

public Encoding(java.lang.String name)
Constructor.

Parameters:
name - The name.

Encoding

public Encoding(java.lang.String name,
                java.lang.String description)
Constructor.

Parameters:
name - The name.
description - The description.
Method Detail

valueOf

public static Encoding valueOf(java.lang.String name)
Returns the encoding associated to a name. If an existing constant exists then it is returned, otherwise a new instance is created.

Parameters:
name - The name.
Returns:
The associated encoding.

equals

public boolean equals(java.lang.Object object)

Overrides:
equals in class Metadata

hashCode

public int hashCode()

Overrides:
hashCode in class Metadata


Copyright © 2005-2008 Noelios Technologies.