public abstract class AbstractTextReader extends AbstractReader
CharsetEncoding
Modifier and Type | Field and Description |
---|---|
protected CharsetEncoding |
encodingProps
Container for character encoding related attributes
|
options, output
Modifier | Constructor and Description |
---|---|
protected |
AbstractTextReader()
Reads an empty source with default settings.
|
protected |
AbstractTextReader(ByteSource source)
Reads the specified data source using default
options.
|
protected |
AbstractTextReader(Path path)
Reads the file specified by the path using default options.
|
protected |
AbstractTextReader(String pattern)
Reads all paths matching the specified pattern
using default options.
|
Modifier and Type | Method and Description |
---|---|
Charset |
getCharset()
Gets the character set used by the data source.
|
String |
getCharsetName()
Gets the name of the character set used by the
data source.
|
int |
getDecodeBuffer()
Gets the size of the buffer, in bytes, used to decode
character data.
|
CharsetEncoding |
getEncoding()
Get the character set encoding properties.
|
CodingErrorAction |
getErrorAction()
Get the configured encoding error action.
|
String |
getReplacement()
Get the text used by the replacement error action.
|
void |
setCharset(Charset charset)
Sets the character set used by the data source.
|
void |
setCharsetName(String charsetName)
Sets the character set used by the data source.
|
void |
setDecodeBuffer(int size)
Sets the size of the buffer, in bytes, used to decode
character data.
|
void |
setEncoding(CharsetEncoding settings)
Set the properties that control character
set encoding.
|
void |
setErrorAction(CodingErrorAction errorAction)
Set the encoding error action.
|
void |
setReplacement(String replacement)
Sets the error policy to be replacement with the specified string.
|
compose, computeFormat, getExtraFieldAction, getFieldErrorAction, getFieldLengthThreshold, getIncludeSourceInfo, getMissingFieldAction, getOutput, getParseOptions, getPessimisticSplitting, getReadBuffer, getReadOnClient, getRecordWarningThreshold, getSelectedFields, getSource, getSplitOptions, getUseMetadata, setExtraFieldAction, setFieldErrorAction, setFieldLengthThreshold, setIncludeSourceInfo, setMissingFieldAction, setParseErrorAction, setParseOptions, setPessimisticSplitting, setReadBuffer, setReadOnClient, setRecordWarningThreshold, setSelectedFields, setSelectedFields, setSource, setSource, setSource, setSplitOptions, setUseMetadata
disableParallelism, getInputPorts, getOutputPorts, newInput, newInput, newOutput, newRecordInput, newRecordInput, newRecordOutput, notifyError
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
disableParallelism, getInputPorts, getOutputPorts
protected final CharsetEncoding encodingProps
protected AbstractTextReader()
AbstractReader.setSource(ByteSource)
protected AbstractTextReader(String pattern)
pattern
- a path-matching patternFileClient#matchPaths(String)
protected AbstractTextReader(Path path)
path
- the path to readprotected AbstractTextReader(ByteSource source)
source
- the data source to readpublic int getDecodeBuffer()
public void setDecodeBuffer(int size)
size
- the decoding buffer size to usepublic CharsetEncoding getEncoding()
public void setEncoding(CharsetEncoding settings)
settings
- character set encoding propertiespublic Charset getCharset()
public void setCharset(Charset charset)
charset
- the character set to usepublic String getCharsetName()
public void setCharsetName(String charsetName)
charsetName
- name of the character setInvalidPropertyValueException
- if the named
character set is not supported.public CodingErrorAction getErrorAction()
public void setErrorAction(CodingErrorAction errorAction)
errorAction
- encoding error actionpublic String getReplacement()
public void setReplacement(String replacement)
replacement
- replacement value to use for encoding errorsCopyright © 2020 Actian Corporation. All rights reserved.