badpenguin.dkim
Enum CanonicalMethod

java.lang.Object
  extended by java.lang.Enum<CanonicalMethod>
      extended by badpenguin.dkim.CanonicalMethod
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<CanonicalMethod>

public enum CanonicalMethod
extends java.lang.Enum<CanonicalMethod>

This class enumerates the three possible Canonicalisation methods, simple, nofws, and relaxed.

Author:
Mark Boddington <dk_NO_im@_SP_bad_AM_penguin.co.uk>
http://www.badpenguin.co.uk

Enum Constant Summary
NOFWS
          The No Folding White Space Canonicalisation method
RELAXED
          The Relaxed Canonicalisation method
SIMPLE
          The Simple Canonicalisation method
 
Method Summary
 java.lang.String getDescription()
          Get the descriptive name for this canonical method.
 boolean validDKIM()
          Return whether this CanonicalMethod is valid for DKIM
 boolean validDomainKey()
          Return whether this CanonicalMethod is valid for DomainKey
static CanonicalMethod valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static CanonicalMethod[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

SIMPLE

public static final CanonicalMethod SIMPLE
The Simple Canonicalisation method


NOFWS

public static final CanonicalMethod NOFWS
The No Folding White Space Canonicalisation method


RELAXED

public static final CanonicalMethod RELAXED
The Relaxed Canonicalisation method

Method Detail

values

public static CanonicalMethod[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (CanonicalMethod c : CanonicalMethod.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static CanonicalMethod valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

validDomainKey

public boolean validDomainKey()
Return whether this CanonicalMethod is valid for DomainKey

Returns:
true or false

validDKIM

public boolean validDKIM()
Return whether this CanonicalMethod is valid for DKIM

Returns:
true or false

getDescription

public java.lang.String getDescription()
Get the descriptive name for this canonical method.

Returns:
the description


© Copyright 2009 Mark Boddington (www.badpenguin.co.uk)