org.apache.commons.flatfile
Class PadJustifyFieldSupport

java.lang.Object
  extended by org.apache.commons.flatfile.EntitySupport
      extended by org.apache.commons.flatfile.FieldSupport
          extended by org.apache.commons.flatfile.PadJustifyFieldSupport
All Implemented Interfaces:
Serializable, Cloneable, Entity
Direct Known Subclasses:
DynamicField, Field

public abstract class PadJustifyFieldSupport
extends FieldSupport

Support for fields with pad/justify.

Version:
$Revision: 758023 $ $Date: 2009-03-24 16:09:19 -0500 (Tue, 24 Mar 2009) $
See Also:
Serialized Form

Nested Class Summary
static class PadJustifyFieldSupport.Justify
          Justify enumerated type.
 
Nested classes/interfaces inherited from class org.apache.commons.flatfile.FieldSupport
FieldSupport.Overflow, FieldSupport.Underflow
 
Constructor Summary
PadJustifyFieldSupport()
           
 
Method Summary
 PadJustifyFieldSupport.Justify getJustify()
          Get the justify.
 byte getPad()
          Get the pad.
protected abstract  int getPadJustifyLength()
          Provide the desired target length for padding/justification actions.
 void setJustify(PadJustifyFieldSupport.Justify justify)
          Set the justify.
 void setPad(byte pad)
          Set the pad.
 void setValue(byte[] b)
          Implement pad/justify.
 
Methods inherited from class org.apache.commons.flatfile.FieldSupport
dieOnExceptionRead
 
Methods inherited from class org.apache.commons.flatfile.EntitySupport
clone, fill, getValue, setValue
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.commons.flatfile.Entity
getValue, length, readFrom, writeTo
 

Constructor Detail

PadJustifyFieldSupport

public PadJustifyFieldSupport()
Method Detail

getJustify

public PadJustifyFieldSupport.Justify getJustify()
Get the justify.

Returns:
Justify

setJustify

public void setJustify(PadJustifyFieldSupport.Justify justify)
Set the justify.

Parameters:
justify - Justify

getPad

public byte getPad()
Get the pad.

Returns:
byte

setPad

public void setPad(byte pad)
Set the pad.

Parameters:
pad - byte

setValue

public void setValue(byte[] b)
Implement pad/justify.

Parameters:
b - value set

getPadJustifyLength

protected abstract int getPadJustifyLength()
Provide the desired target length for padding/justification actions.

Returns:
int


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