org.neociclo.odetteftp.protocol.v20
Enum FileEnveloping

java.lang.Object
  extended by java.lang.Enum<FileEnveloping>
      extended by org.neociclo.odetteftp.protocol.v20.FileEnveloping
All Implemented Interfaces:
Serializable, Comparable<FileEnveloping>

public enum FileEnveloping
extends Enum<FileEnveloping>

Enumeration indicating the enveloping format used in the file.

    Value: '0'  No compression
           '1'  Compressed with [ZLIB] algorithm
 

If the file is encrypted/signed/compressed or is an file for the exchange and revocation of certificates, this field must be set accordingly.

Version:
$Rev: 122 $ $Date: 2009-07-22 08:20:41 -0300 (Wed, 22 Jul 2009) $
Author:
Rafael Marins

Enum Constant Summary
CMS
           
NO_ENVELOPE
           
 
Method Summary
 int getCode()
          Return the protocol representation of enum.
static FileEnveloping parse(int code)
          Convenient method for parsing the proper FileEnveloping enum given a protocol code.
static FileEnveloping valueOf(String name)
          Returns the enum constant of this type with the specified name.
static FileEnveloping[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

NO_ENVELOPE

public static final FileEnveloping NO_ENVELOPE

CMS

public static final FileEnveloping CMS
Method Detail

values

public static FileEnveloping[] 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 (FileEnveloping c : FileEnveloping.values())
    System.out.println(c);

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

valueOf

public static FileEnveloping valueOf(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:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

parse

public static FileEnveloping parse(int code)
                            throws OdetteFtpException
Convenient method for parsing the proper FileEnveloping enum given a protocol code.

Parameters:
code - The file enveloping format being evaluated
Returns:
FileEnveloping enum that correspond to the given code.
Throws:
OdetteFtpException
CommandNotRecognisedException - Code not recognized

getCode

public int getCode()
Return the protocol representation of enum.

Returns:
int corresponding protocol code.


ACCORD