it.assist.jrecordbind
Interface Padder

All Known Implementing Classes:
SpaceLeftPadder, SpaceRightPadder, ZeroLeftPadder, ZeroRightPadder

public interface Padder

Used by the Marshaller: some records require data to be left or right aligned. By default the Marshaller will left align using spaces. JRecordBind comes with 4 pre-build padders that will left/right pad with spaces/zeros. If you need a different padding, you can specify it by implementing this interface.
Padders can be global (specified in the "main" tag of the .xsd definition) and can be custom (specified at the single element level)

Author:
Federico Fissore

Method Summary
 String pad(String string, int length)
          Pads a string to the given length
 

Method Detail

pad

String pad(String string,
           int length)
Pads a string to the given length

Parameters:
string - the string to pad
length - the length of the final string
Returns:
the padded string


Copyright © 2009-2011. All Rights Reserved.