org.neociclo.odetteftp.protocol
Enum RecordFormat

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

public enum RecordFormat
extends Enum<RecordFormat>

Version:
$Rev: 456 $ $Date: 2010-06-30 16:05:57 -0300 (Wed, 30 Jun 2010) $
Author:
Rafael Marins

Enum Constant Summary
FIXED
          Each record in the file has the same length.
TEXTFILE
          A Text File is defined as a sequence of ASCII characters, containing no control characters except CR/LF which delimits lines.
UNSTRUCTURED
          The file contains a stream of data.
VARIABLE
          The records in the file can have different lengths.
 
Method Summary
 String getCode()
           
static RecordFormat parse(String code)
          Convenient method for parsing the proper RecordFormat enum given a code character.
static RecordFormat valueOf(String name)
          Returns the enum constant of this type with the specified name.
static RecordFormat[] 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

FIXED

public static final RecordFormat FIXED
Each record in the file has the same length.


TEXTFILE

public static final RecordFormat TEXTFILE
A Text File is defined as a sequence of ASCII characters, containing no control characters except CR/LF which delimits lines. A line will not have more than 2048 characters.


UNSTRUCTURED

public static final RecordFormat UNSTRUCTURED
The file contains a stream of data. No structure is defined.


VARIABLE

public static final RecordFormat VARIABLE
The records in the file can have different lengths.

Method Detail

values

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

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

valueOf

public static RecordFormat 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 RecordFormat parse(String code)
Convenient method for parsing the proper RecordFormat enum given a code character.

Parameters:
code - The record format being evaluated
Returns:
RecordFormat Instance that correspond to the parameter
Throws:
IllegalArgumentException - Record Format not recognised

getCode

public String getCode()


ACCORD