Splitter<InputStreamHandle>
public class UnarySplitter extends java.lang.Object implements Splitter<InputStreamHandle>
Modifier and Type | Class | Description |
---|---|---|
static interface |
UnarySplitter.UriMaker |
UriMaker which generates URI for each split
file
|
Constructor | Description |
---|---|
UnarySplitter() |
Modifier and Type | Method | Description |
---|---|---|
long |
getCount() |
Returns the number of splits.
|
UnarySplitter.UriMaker |
getUriMaker() |
Get the UriMaker of the splitter
|
void |
setUriMaker(UnarySplitter.UriMaker uriMaker) |
Set the UriMaker to the splitter
|
java.util.stream.Stream<InputStreamHandle> |
split(java.io.InputStream input) |
Takes a input stream of a file and convert the
entire file to a stream of InputStreamHandle
|
java.util.stream.Stream<DocumentWriteOperation> |
splitWriteOperations(java.io.InputStream input) |
Takes a input stream of a file and convert the
entire file to a stream of DocumentWriteOperation
|
java.util.stream.Stream<DocumentWriteOperation> |
splitWriteOperations(java.io.InputStream input,
java.lang.String splitFilename) |
Takes a input stream and the name of a file,
then convert the entire file to a stream of
DocumentWriteOperation
|
public UnarySplitter.UriMaker getUriMaker()
public void setUriMaker(UnarySplitter.UriMaker uriMaker)
uriMaker
- the uriMaker to generate URI of each
split file.public java.util.stream.Stream<InputStreamHandle> split(java.io.InputStream input) throws java.lang.Exception
split
in interface Splitter<InputStreamHandle>
input
- is the incoming input stream.java.lang.Exception
- if input cannot be
splitpublic java.util.stream.Stream<DocumentWriteOperation> splitWriteOperations(java.io.InputStream input) throws java.lang.Exception
splitWriteOperations
in
interface Splitter<InputStreamHandle>
input
- is the incoming input stream.java.lang.Exception
- if input cannot be
splitpublic java.util.stream.Stream<DocumentWriteOperation> splitWriteOperations(java.io.InputStream input, java.lang.String splitFilename) throws java.lang.Exception
splitWriteOperations
in
interface Splitter<InputStreamHandle>
input
- is the incoming input stream.splitFilename
- is the file name, including name
and extension. It is used to generate URLs for split files. The
splitFilename could either be provided here or in user-defined
UriMaker.java.lang.Exception
- if input cannot be
splitpublic long getCount()
getCount
in interface Splitter<InputStreamHandle>
Copyright © 2022 MarkLogic Corporation