public class DelimitedRecordFormat extends Object implements RecordFormat
RecordFormat
for delimited records.
A delimited record may be configured to validate a record field count by setting a minimum and maximum length.
Constructor and Description |
---|
DelimitedRecordFormat()
Constructs a new DelimitedRecordFormat.
|
Modifier and Type | Method and Description |
---|---|
int |
getMaxLength()
Returns the maximum number of fields in the record.
|
int |
getMaxMatchLength()
Returns the maximum record length for identifying a record.
|
int |
getMinLength()
Returns the minimum number of fields in the record.
|
int |
getMinMatchLength()
Returns the minimum record length for identifying a record.
|
boolean |
matches(UnmarshallingContext context)
Returns whether the record meets configured matching criteria
during unmarshalling.
|
void |
setMaxLength(int maxLength)
Sets the maximum number of fields in the record.
|
void |
setMaxMatchLength(int maxMatchLength)
Sets the maximum record length for identifying a record.
|
void |
setMinLength(int minLength)
Sets the minimum number of fields in the record.
|
void |
setMinMatchLength(int minMatchLength)
Sets the minimum record length for identifying a record.
|
String |
toString() |
void |
validate(UnmarshallingContext context)
Validates a record during unmarshalling.
|
public DelimitedRecordFormat()
public boolean matches(UnmarshallingContext context)
RecordFormat
matches
in interface RecordFormat
context
- the UnmarshallingContext
public void validate(UnmarshallingContext context)
RecordFormat
validate
in interface RecordFormat
context
- the UnmarshallingContext
to validatepublic int getMinLength()
public void setMinLength(int minLength)
minLength
- minimum field countpublic int getMaxLength()
Integer.MAX_VALUE
.public void setMaxLength(int maxLength)
maxLength
- maximum field countpublic int getMinMatchLength()
public void setMinMatchLength(int minMatchLength)
minMatchLength
- the minimum number of fieldspublic int getMaxMatchLength()
public void setMaxMatchLength(int maxMatchLength)
maxMatchLength
- the maximum number of fields