BeanIO 1.2.3

org.beanio.stream.fixedlength
Class FixedLengthReaderConfiguration

java.lang.Object
  extended by org.beanio.stream.fixedlength.FixedLengthReaderConfiguration
Direct Known Subclasses:
FixedLengthReaderFactory

public class FixedLengthReaderConfiguration
extends Object

Stores configuration settings for a FixedLengthReader.

Since:
1.2
Author:
Kevin Seim
See Also:
FixedLengthReader

Constructor Summary
FixedLengthReaderConfiguration()
          Constructs a new FixedLengthReaderConfiguration.
 
Method Summary
 String[] getComments()
          Returns the array of comment prefixes.
 Character getLineContinuationCharacter()
          Returns the line continuation character.
 Character getRecordTerminator()
          Returns the character used to mark the end of a record.
 boolean isCommentEnabled()
          Returns whether one or more comment prefixes have been configured.
 boolean isLineContinationEnabled()
          Returns whether the line continuation character is enabled.
 void setComments(String[] comments)
          Sets the array of comment prefixes.
 void setLineContinuationCharacter(Character lineContinuationCharacter)
          Sets the line continuation character.
 void setRecordTerminator(Character recordTerminator)
          Sets the character used to mark the end of a record.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FixedLengthReaderConfiguration

public FixedLengthReaderConfiguration()
Constructs a new FixedLengthReaderConfiguration.

Method Detail

getLineContinuationCharacter

public Character getLineContinuationCharacter()
Returns the line continuation character. By default, line continuation is disabled and null is returned.

Returns:
the line continuation character or null if disabled

setLineContinuationCharacter

public void setLineContinuationCharacter(Character lineContinuationCharacter)
Sets the line continuation character. Set to null to disable line continuation.

Parameters:
lineContinuationCharacter - the line continuation character

isLineContinationEnabled

public boolean isLineContinationEnabled()
Returns whether the line continuation character is enabled. By default, line continuation is disabled.

Returns:
true if the line continuation character is enabled

getRecordTerminator

public Character getRecordTerminator()
Returns the character used to mark the end of a record. By default, a carriage return (CR), line feed (LF), or CRLF sequence is used to signify the end of the record.

Returns:
the record termination character

setRecordTerminator

public void setRecordTerminator(Character recordTerminator)
Sets the character used to mark the end of a record. If set to null, a carriage return (CR), line feed (LF), or CRLF sequence is used.

Parameters:
recordTerminator - the record termination character

getComments

public String[] getComments()
Returns the array of comment prefixes. If a line read from a stream begins with a configured comment prefix, the line is ignored. By default, no lines are considered commented.

Returns:
the array of comment prefixes

setComments

public void setComments(String[] comments)
Sets the array of comment prefixes. If a line read from a stream begins with a configured comment prefix, the line is ignored.

Parameters:
comments - the array of comment prefixes

isCommentEnabled

public boolean isCommentEnabled()
Returns whether one or more comment prefixes have been configured.

Returns:
true if one or more comment prefixes have been configured

BeanIO 1.2.3

Copyright © 2010-2012 Kevin Seim