org.neociclo.odetteftp.protocol.v20
Enum FileCompression

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

public enum FileCompression
extends Enum<FileCompression>

Enumeration indicating the algorithm used to compress the file.

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

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

Enum Constant Summary
NO_COMPRESSION
           
ZLIB
           
 
Method Summary
 int getCode()
          Return the protocol representation of enum.
static FileCompression parse(int code)
          Convenient method for parsing the proper CompressionAlgorithm enum given a protocol code.
static FileCompression valueOf(String name)
          Returns the enum constant of this type with the specified name.
static FileCompression[] 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_COMPRESSION

public static final FileCompression NO_COMPRESSION

ZLIB

public static final FileCompression ZLIB
Method Detail

values

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

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

valueOf

public static FileCompression 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 FileCompression parse(int code)
                             throws OdetteFtpException
Convenient method for parsing the proper CompressionAlgorithm enum given a protocol code.

Parameters:
code - The compression algorithm being evaluated
Returns:
CompressionAlgorithm 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