org.apache.commons.flatfile
Enum FieldSupport.Overflow

java.lang.Object
  extended by java.lang.Enum<FieldSupport.Overflow>
      extended by org.apache.commons.flatfile.FieldSupport.Overflow
All Implemented Interfaces:
Serializable, Comparable<FieldSupport.Overflow>, FieldOption
Enclosing class:
FieldSupport

public static enum FieldSupport.Overflow
extends Enum<FieldSupport.Overflow>
implements FieldOption

Overflow behavior enumerated type.


Enum Constant Summary
ERROR
          Error on overflow
IGNORE
          Ignore overflow (same as TRUNCATE)
TRUNCATE
          Truncate on overflow (same as IGNORE)
 
Method Summary
protected  void check(byte[] b, int len)
          Check the overflow of the field
static FieldSupport.Overflow valueOf(String name)
          Returns the enum constant of this type with the specified name.
static FieldSupport.Overflow[] values()
          Returns an array containing the constants of this enum type, in the order they're declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

ERROR

public static final FieldSupport.Overflow ERROR
Error on overflow


TRUNCATE

public static final FieldSupport.Overflow TRUNCATE
Truncate on overflow (same as IGNORE)


IGNORE

public static final FieldSupport.Overflow IGNORE
Ignore overflow (same as TRUNCATE)

Method Detail

values

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

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

valueOf

public static FieldSupport.Overflow 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

check

protected void check(byte[] b,
                     int len)
Check the overflow of the field

Parameters:
b - value
len - field length


Copyright © 2008-2009 The Apache Software Foundation. All Rights Reserved.