TextSplitOptions
Inheritance: java.lang.Object
All Implemented Interfaces: com.groupdocs.merger.domain.options.interfaces.ITextSplitOptions
public class TextSplitOptions implements ITextSplitOptions
Provides options for the document text splitting.
Constructors
| Constructor | Description |
|---|---|
| TextSplitOptions(int[] lineNumbers) | Initializes a new instance of the TextSplitOptions class. |
| TextSplitOptions(int mode, int[] lineNumbers) | Initializes a new instance of the TextSplitOptions class. |
| TextSplitOptions(String filePathFormat, int[] lineNumbers) | Initializes a new instance of the TextSplitOptions class. |
| TextSplitOptions(String filePathFormat, int mode, int[] lineNumbers) | Initializes a new instance of the TextSplitOptions class. |
| TextSplitOptions(SplitStreamFactory splitStreamFactory, int[] lineNumbers) | Initializes a new instance of the TextSplitOptions class. |
| TextSplitOptions(SplitStreamFactory splitStreamFactory, int mode, int[] lineNumbers) | Initializes a new instance of the TextSplitOptions class. |
Methods
| Method | Description |
|---|---|
| getMode() | Mode for text splitting. |
| getLineNumbers() | Line numbers for text splitting. |
| validate(FileType fileType) | Validates the split options. |
| getPathByIndex(int index, String extension) | Gets the full file path of splitted document by index with defined extension. |
| getSplitStreamFactory() | SplitStreamFactory for create or release output page preview stream. |
TextSplitOptions(int[] lineNumbers)
public TextSplitOptions(int[] lineNumbers)
Initializes a new instance of the TextSplitOptions class.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| lineNumbers | int[] | Line numbers for text splitting. |
TextSplitOptions(int mode, int[] lineNumbers)
public TextSplitOptions(int mode, int[] lineNumbers)
Initializes a new instance of the TextSplitOptions class.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| mode | int | Mode for text splitting. |
| lineNumbers | int[] | Line numbers for text splitting. |
TextSplitOptions(String filePathFormat, int[] lineNumbers)
public TextSplitOptions(String filePathFormat, int[] lineNumbers)
Initializes a new instance of the TextSplitOptions class.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| filePathFormat | java.lang.String | The file path format e.g. ‘c:/split{0}.doc’ or ‘c:/split{0}.{1}’ with already defined extension. |
| lineNumbers | int[] | Line numbers for text splitting. |
TextSplitOptions(String filePathFormat, int mode, int[] lineNumbers)
public TextSplitOptions(String filePathFormat, int mode, int[] lineNumbers)
Initializes a new instance of the TextSplitOptions class.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| filePathFormat | java.lang.String | The file path format e.g. ‘c:/split{0}.doc’ or ‘c:/split{0}.{1}’ with already defined extension. |
| mode | int | Mode for text splitting. |
| lineNumbers | int[] | Line numbers for text splitting. |
TextSplitOptions(SplitStreamFactory splitStreamFactory, int[] lineNumbers)
public TextSplitOptions(SplitStreamFactory splitStreamFactory, int[] lineNumbers)
Initializes a new instance of the TextSplitOptions class.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| splitStreamFactory | SplitStreamFactory | The method that instantiates stream used to write output split data. |
| lineNumbers | int[] | Line numbers for text splitting. |
TextSplitOptions(SplitStreamFactory splitStreamFactory, int mode, int[] lineNumbers)
public TextSplitOptions(SplitStreamFactory splitStreamFactory, int mode, int[] lineNumbers)
Initializes a new instance of the TextSplitOptions class.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| splitStreamFactory | SplitStreamFactory | The method that instantiates stream used to write output split data. |
| mode | int | Mode for text splitting. |
| lineNumbers | int[] | Line numbers for text splitting. |
getMode()
public final int getMode()
Mode for text splitting.
Returns: int
getLineNumbers()
public final int[] getLineNumbers()
Line numbers for text splitting.
Returns: int[]
validate(FileType fileType)
public final void validate(FileType fileType)
Validates the split options.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| fileType | FileType | The file type of FileType class. |
getPathByIndex(int index, String extension)
public final String getPathByIndex(int index, String extension)
Gets the full file path of splitted document by index with defined extension.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| index | int | Index of splitted document. |
| extension | java.lang.String | Extension of file. |
Returns: java.lang.String - The full file path.
getSplitStreamFactory()
public SplitStreamFactory getSplitStreamFactory()
SplitStreamFactory for create or release output page preview stream.
Returns: SplitStreamFactory