FixedWidthFormat, FixedWidthFields, FixedWidthWriterSettings, FixedWidthParser, AbstractWriter
| Modifier and Type | Field and Description |
|---|---|
| private FieldAlignment | |
| private FieldAlignment | |
| private boolean | |
| private char | |
| private FieldAlignment[] | |
| private int[] | |
| private char[] | |
| private boolean[] | |
| private int | |
| private int | |
| private Lookup[] | |
| private Lookup | |
| private Lookup[] | |
| private char[] | |
| private char | |
| private FieldAlignment[] | |
| private boolean[] | |
| private int[] | |
| private char[] |
| Access | Constructor and Description |
|---|---|
| public | FixedWidthWriter(FixedWidthWriterSettings
the fixed-width writer configuration settings)The FixedWidthWriter supports all settings provided by |
| public | FixedWidthWriter(Writer
the output resource that will receive fixed-width records produced by this class. writer, FixedWidthWriterSettings the fixed-width writer configuration settings)The FixedWidthWriter supports all settings provided by |
| public | FixedWidthWriter(File
the output file that will receive fixed-width records produced by this class. file, FixedWidthWriterSettings the fixed-width writer configuration settings)The FixedWidthWriter supports all settings provided by |
| public | FixedWidthWriter(File
the output file that will receive fixed-width records produced by this class. file, String the encoding of the file encoding, FixedWidthWriterSettings the fixed-width writer configuration settings)The FixedWidthWriter supports all settings provided by |
| public | FixedWidthWriter(File
the output file that will receive fixed-width records produced by this class. file, Charset the encoding of the file encoding, FixedWidthWriterSettings the fixed-width writer configuration settings)The FixedWidthWriter supports all settings provided by |
| public | FixedWidthWriter(OutputStream
the output stream that will be written with the fixed-width records produced by this class. output, FixedWidthWriterSettings the fixed-width writer configuration settings)The FixedWidthWriter supports all settings provided by |
| public | FixedWidthWriter(OutputStream
the output stream that will be written with the fixed-width records produced by this class. output, String the encoding of the stream encoding, FixedWidthWriterSettings the fixed-width writer configuration settings)The FixedWidthWriter supports all settings provided by |
| public | FixedWidthWriter(OutputStream
the output stream that will be written with the fixed-width records produced by this class. output, Charset the encoding of the stream encoding, FixedWidthWriterSettings the fixed-width writer configuration settings)The FixedWidthWriter supports all settings provided by |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| protected final void | initialize(FixedWidthWriterSettings
the Fixed-Width writer configuration settings)Implements abstract com. |
| private void | |
| protected void | processRow(Object[]
the data to be written to the output in the expected format. row)Implements abstract com. |
| alignment | back to summary |
|---|---|
| private FieldAlignment alignment | |
| defaultHeaderAlignment | back to summary |
|---|---|
| private FieldAlignment defaultHeaderAlignment | |
| defaultHeaderPadding | back to summary |
|---|---|
| private boolean defaultHeaderPadding | |
| defaultPadding | back to summary |
|---|---|
| private char defaultPadding | |
| fieldAlignments | back to summary |
|---|---|
| private FieldAlignment[] fieldAlignments | |
| fieldLengths | back to summary |
|---|---|
| private int[] fieldLengths | |
| fieldPaddings | back to summary |
|---|---|
| private char[] fieldPaddings | |
| ignore | back to summary |
|---|---|
| private boolean[] ignore | |
| ignoreCount | back to summary |
|---|---|
| private int ignoreCount | |
| length | back to summary |
|---|---|
| private int length | |
| lookaheadFormats | back to summary |
|---|---|
| private Lookup[] lookaheadFormats | |
| lookbehindFormat | back to summary |
|---|---|
| private Lookup lookbehindFormat | |
| lookbehindFormats | back to summary |
|---|---|
| private Lookup[] lookbehindFormats | |
| lookupChars | back to summary |
|---|---|
| private char[] lookupChars | |
| padding | back to summary |
|---|---|
| private char padding | |
| rootAlignments | back to summary |
|---|---|
| private FieldAlignment[] rootAlignments | |
| rootIgnore | back to summary |
|---|---|
| private boolean[] rootIgnore | |
| rootLengths | back to summary |
|---|---|
| private int[] rootLengths | |
| rootPaddings | back to summary |
|---|---|
| private char[] rootPaddings | |
| FixedWidthWriter | back to summary |
|---|---|
| public FixedWidthWriter(FixedWidthWriterSettings settings) The FixedWidthWriter supports all settings provided by Important Note by not providing an instance of
| |
| FixedWidthWriter | back to summary |
|---|---|
| public FixedWidthWriter(Writer writer, FixedWidthWriterSettings settings) The FixedWidthWriter supports all settings provided by
| |
| FixedWidthWriter | back to summary |
|---|---|
| public FixedWidthWriter(File file, FixedWidthWriterSettings settings) The FixedWidthWriter supports all settings provided by
| |
| FixedWidthWriter | back to summary |
|---|---|
| public FixedWidthWriter(File file, String encoding, FixedWidthWriterSettings settings) The FixedWidthWriter supports all settings provided by
| |
| FixedWidthWriter | back to summary |
|---|---|
| public FixedWidthWriter(File file, Charset encoding, FixedWidthWriterSettings settings) The FixedWidthWriter supports all settings provided by
| |
| FixedWidthWriter | back to summary |
|---|---|
| public FixedWidthWriter(OutputStream output, FixedWidthWriterSettings settings) The FixedWidthWriter supports all settings provided by
| |
| FixedWidthWriter | back to summary |
|---|---|
| public FixedWidthWriter(OutputStream output, String encoding, FixedWidthWriterSettings settings) The FixedWidthWriter supports all settings provided by
| |
| FixedWidthWriter | back to summary |
|---|---|
| public FixedWidthWriter(OutputStream output, Charset encoding, FixedWidthWriterSettings settings) The FixedWidthWriter supports all settings provided by
| |
| append | back to summary |
|---|---|
| private void append(String element, boolean allowTrim) | |
| initialize | back to summary |
|---|---|
| protected final void initialize(FixedWidthWriterSettings settings) Implements abstract com. Initializes the Fixed-Width writer with CSV-specific configuration
| |
| processElement | back to summary |
|---|---|
| private void processElement(String element, boolean allowTrim) | |
| processRow | back to summary |
|---|---|
| protected void processRow(Object[] row) Implements abstract com. Doc from com. Format-specific implementation for writing a single record into the output.
The AbstractWriter handles the initialization and processing of the output until it is ready to be written (generally, reorganizing it and passing it on
to a
processRow(Object[]) method returns, a row will be written to the output with the processed information, and a newline will be automatically written after the given contents, unless this is a
com. whose FixedWidthWriterSettings#getWriteLineSeparatorAfterRecord() evaluates to false. The newline character sequence will conform to what is specified in Format#getLineSeparator()
This cycle repeats until the writing process is stopped by the user or an error happens.
In case of errors, the unchecked exception TextWritingException will be thrown and all resources in use will be closed automatically. The exception should contain the cause and more information about the output state when the error happened.
| |