|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.univocity.parsers.common.Format
com.univocity.parsers.fixed.FixedWidthFormat
public class FixedWidthFormat
The Fixed-Width format configuration. In addition to the default configuration in Format, the fixed-width format defines:
e.g. if a field has a length of 5 characters, but the value is 'ZZ', the field should contain [ZZ ] (i.e. ZZ followed by 3 unwritten spaces).
If the padding is set to '_', then the field will be written as [ZZ___]
Format| Constructor Summary | |
|---|---|
FixedWidthFormat()
|
|
| Method Summary | |
|---|---|
FixedWidthFormat |
clone()
|
protected TreeMap<String,Object> |
getConfiguration()
|
char |
getLookupWildcard()
Returns the lookup wildcard character to accept any character in look-ahead or look-behind patterns defined using FixedWidthParserSettings.addFormatForLookahead(String, FixedWidthFields) or
FixedWidthParserSettings.addFormatForLookbehind(String, FixedWidthFields). |
char |
getPadding()
Returns the padding character used to represent unwritten spaces. |
boolean |
isPadding(char padding)
Identifies whether or not a given character represents a padding character |
void |
setLookupWildcard(char lookupWildcard)
Defines the lookup wildcard character to accept any character in look-ahead or look-behind patterns defined using FixedWidthParserSettings.addFormatForLookahead(String, FixedWidthFields) or
FixedWidthParserSettings.addFormatForLookbehind(String, FixedWidthFields). |
void |
setPadding(char padding)
Defines the padding character used to represent unwritten spaces. |
| Methods inherited from class com.univocity.parsers.common.Format |
|---|
getComment, getLineSeparator, getLineSeparatorString, getNormalizedNewline, getSystemLineSeparator, isComment, isNewLine, setComment, setLineSeparator, setLineSeparator, setNormalizedNewline, toString |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public FixedWidthFormat()
| Method Detail |
|---|
public char getPadding()
public void setPadding(char padding)
padding - the padding characterpublic boolean isPadding(char padding)
padding - the character to be verified
protected TreeMap<String,Object> getConfiguration()
getConfiguration in class Formatpublic final FixedWidthFormat clone()
clone in class Formatpublic char getLookupWildcard()
FixedWidthParserSettings.addFormatForLookahead(String, FixedWidthFields) or
FixedWidthParserSettings.addFormatForLookbehind(String, FixedWidthFields).
Defaults to '?'
public void setLookupWildcard(char lookupWildcard)
FixedWidthParserSettings.addFormatForLookahead(String, FixedWidthFields) or
FixedWidthParserSettings.addFormatForLookbehind(String, FixedWidthFields).
Defaults to '?'
lookupWildcard - the wildcard character to be used in lookahead/behind patterns.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||