TextSplitOptions
Leave feedback
On this page
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.
| 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. |
| 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. |
public TextSplitOptions(int[] lineNumbers)
Initializes a new instance of the TextSplitOptions class.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| lineNumbers | int[] | Line numbers for text splitting. |
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. |
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. |
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. |
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. |
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. |
public final int getMode()
Mode for text splitting.
Returns: int
public final int[] getLineNumbers()
Line numbers for text splitting.
Returns: int[]
public final void validate(FileType fileType)
Validates the split options.
Parameters:
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.
public SplitStreamFactory getSplitStreamFactory()
SplitStreamFactory for create or release output page preview stream.
Returns: SplitStreamFactory
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.