Package com._1c.g5.v8.dt.xml
Class LineFeedConverter
java.lang.Object
com._1c.g5.v8.dt.xml.LineFeedConverter
Convert line separators in multiline data
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
Defines the convert options. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
convert
(InputStream source, OutputStream target, LineFeedConverter.ConvertOption... options) Convert data from source stream to target streamstatic String
convert
(String text, LineFeedConverter.ConvertOption... options) Convert multiline string with the options parameter specifying how the convert is performed.static void
convert
(Path source, Path target, LineFeedConverter.ConvertOption... options) Convert data from source path to target path
-
Constructor Details
-
LineFeedConverter
public LineFeedConverter()
-
-
Method Details
-
convert
Convert multiline string with the options parameter specifying how the convert is performed. By default, the will be converting to system line endings Only first option of the following used to determine target line seporator:- Parameters:
text
- source text, cannot benull
options
- the options specifying how the convert should be done- Returns:
- converted text, never
null
-
convert
public static void convert(Path source, Path target, LineFeedConverter.ConvertOption... options) throws IOException Convert data from source path to target pathThis method convert data from source path to target path with the options parameter specifying how the convert is performed. By default, the will be converting to system line endings without BOM information.
Only first option of the following used to determine target line seporator: and only first of the following used to determine target BOM information:- Parameters:
source
- the source path to content, cannot benull
target
- the target path to copy in, cannot benull
options
- the options specifying how the convert should be done- Throws:
IOException
- the some of I/O exception occured
-
convert
public static void convert(InputStream source, OutputStream target, LineFeedConverter.ConvertOption... options) throws IOException Convert data from source stream to target streamThis method convert data from source stream to target stream with the options parameter specifying how the convert is performed. By default, the will be converting to system line endings without BOM information.
Only first option of the following used to determine target line seporator: and only first of the following used to determine target BOM information:- Parameters:
source
- the input stream of source content that supportsmark
andreset
operations, cannot benull
target
- the target output stream to copy in, cannot benull
options
- the options specifying how the convert should be done- Throws:
IOException
- the some of I/O exception occured
-