org.apache.james.mime4j.field
Class ContentTransferEncodingField

java.lang.Object
  extended by org.apache.james.mime4j.field.Field
      extended by org.apache.james.mime4j.field.ContentTransferEncodingField

public class ContentTransferEncodingField
extends Field

Represents a Content-Transfer-Encoding field.

Version:
$Id: ContentTransferEncodingField.java,v 1.2 2004/10/02 12:41:11 ntherning Exp $

Nested Class Summary
static class ContentTransferEncodingField.Parser
           
 
Field Summary
static java.lang.String ENC_7BIT
          The 7bit encoding.
static java.lang.String ENC_8BIT
          The 8bit encoding.
static java.lang.String ENC_BASE64
          The base64 encoding.
static java.lang.String ENC_BINARY
          The binary encoding.
static java.lang.String ENC_QUOTED_PRINTABLE
          The quoted-printable encoding.
 
Fields inherited from class org.apache.james.mime4j.field.Field
BCC, CC, CONTENT_TRANSFER_ENCODING, CONTENT_TYPE, DATE, FROM, REPLY_TO, RESENT_BCC, RESENT_CC, RESENT_DATE, RESENT_FROM, RESENT_SENDER, RESENT_TO, SENDER, SUBJECT, TO
 
Constructor Summary
protected ContentTransferEncodingField(java.lang.String name, java.lang.String body, java.lang.String raw, java.lang.String encoding)
           
 
Method Summary
 java.lang.String getEncoding()
          Gets the encoding defined in this field.
static java.lang.String getEncoding(ContentTransferEncodingField f)
          Gets the encoding of the given field if.
 
Methods inherited from class org.apache.james.mime4j.field.Field
getBody, getName, getParser, getRaw, isContentType, isFrom, isSubject, isTo, parse, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ENC_7BIT

public static final java.lang.String ENC_7BIT
The 7bit encoding.

See Also:
Constant Field Values

ENC_8BIT

public static final java.lang.String ENC_8BIT
The 8bit encoding.

See Also:
Constant Field Values

ENC_BINARY

public static final java.lang.String ENC_BINARY
The binary encoding.

See Also:
Constant Field Values

ENC_QUOTED_PRINTABLE

public static final java.lang.String ENC_QUOTED_PRINTABLE
The quoted-printable encoding.

See Also:
Constant Field Values

ENC_BASE64

public static final java.lang.String ENC_BASE64
The base64 encoding.

See Also:
Constant Field Values
Constructor Detail

ContentTransferEncodingField

protected ContentTransferEncodingField(java.lang.String name,
                                       java.lang.String body,
                                       java.lang.String raw,
                                       java.lang.String encoding)
Method Detail

getEncoding

public java.lang.String getEncoding()
Gets the encoding defined in this field.

Returns:
the encoding or an empty string if not set.

getEncoding

public static java.lang.String getEncoding(ContentTransferEncodingField f)
Gets the encoding of the given field if. Returns the default 7bit if not set or if f is null.

Returns:
the encoding.


Copyright © 2004-2007 The Apache Software Foundation. All Rights Reserved.