public class RecordSeparatorSettings extends Object implements RecordSeparatorSpecifier
Modifier and Type | Field and Description |
---|---|
static String |
SYSTEM_NEWLINE
The newline character used on the local system.
|
Constructor and Description |
---|
RecordSeparatorSettings()
Creates a new container with default settings.
|
RecordSeparatorSettings(RecordSeparatorSpecifier source)
Creates a container initialized using the given structural information.
|
Modifier and Type | Method and Description |
---|---|
boolean |
getAutoDiscoverNewline()
Indicates whether automated newline discovery is configured.
|
String |
getRecordSeparator()
Gets the value used as a record separator in structured text.
|
void |
set(RecordSeparatorSpecifier options)
Copy the settings from the given structure specifier.
|
void |
setAutoDiscoverNewline(boolean enabled)
Sets whether automated newline discovery is configured.
|
void |
setRecordSeparator(String separator)
Set the value to use as a record separator when reading or writing text
files.
|
String |
toString() |
public static final String SYSTEM_NEWLINE
public RecordSeparatorSettings()
public RecordSeparatorSettings(RecordSeparatorSpecifier source)
source
- record specifier data from which to initialize the settingspublic void set(RecordSeparatorSpecifier options)
RecordSeparatorSpecifier
set
in interface RecordSeparatorSpecifier
options
- record specifier containing the desired settingspublic String getRecordSeparator()
RecordSeparatorSpecifier
getRecordSeparator
in interface RecordSeparatorSpecifier
public void setRecordSeparator(String separator)
RecordSeparatorSpecifier
Setting this value disables newline style discovery.
setRecordSeparator
in interface RecordSeparatorSpecifier
separator
- the value to use as a record separatorRecordSeparatorSpecifier.setAutoDiscoverNewline(boolean)
public boolean getAutoDiscoverNewline()
RecordSeparatorSpecifier
getAutoDiscoverNewline
in interface RecordSeparatorSpecifier
true
if newline style discovery is enabled,
false
otherwise.public void setAutoDiscoverNewline(boolean enabled)
RecordSeparatorSpecifier
Enabling this changes the the record separator to the default line separator for the installed operating system of the execution environment. It should be also noted that this setting may not be recognized in all contexts.
setAutoDiscoverNewline
in interface RecordSeparatorSpecifier
enabled
- indicates whether to discover newline style.RecordSeparatorSpecifier.setRecordSeparator(String)
Copyright © 2016 Actian Corporation. All rights reserved.