public class LineSplitter extends java.lang.Object implements Splitter<StringHandle>
Modifier and Type | Class and Description |
---|---|
static interface |
LineSplitter.UriMaker
UriMaker which generates URI for each split
file
|
Constructor and Description |
---|
LineSplitter() |
Modifier and Type | Method and Description |
---|---|
long |
getCount()
Used to return the number of objects in the
stream.
|
Format |
getFormat()
Returns the document format set to
splitter.
|
LineSplitter.UriMaker |
getUriMaker()
Get the UriMaker of the splitter
|
void |
setFormat(Format format)
Used to set document format to splitter.
|
void |
setUriMaker(LineSplitter.UriMaker uriMaker)
Set the UriMaker to the splitter
|
java.util.stream.Stream<StringHandle> |
split(java.io.InputStream input)
Takes the input stream and converts it into a
stream of StringHandle.
|
java.util.stream.Stream<StringHandle> |
split(java.io.InputStream input,
java.nio.charset.Charset charset)
Takes the input stream and converts it into a
stream of StringHandle.
|
java.util.stream.Stream<StringHandle> |
split(java.io.Reader input)
Takes the Reader input and converts it into a
stream of StringHandle.
|
java.util.stream.Stream<DocumentWriteOperation> |
splitWriteOperations(java.io.InputStream input)
Takes the input stream and converts it into a
stream of DocumentWriteOperation.
|
java.util.stream.Stream<DocumentWriteOperation> |
splitWriteOperations(java.io.InputStream input,
java.lang.String splitFilename)
Takes the input stream and input file name and
converts it into a stream of DocumentWriteOperation.
|
public Format getFormat()
public void setFormat(Format format)
format
- the document content format.public long getCount()
getCount
in interface Splitter<StringHandle>
public java.util.stream.Stream<StringHandle> split(java.io.InputStream input) throws java.io.IOException
split
in interface Splitter<StringHandle>
input
- is the incoming input stream.java.io.IOException
- if the input cannot be
splitpublic java.util.stream.Stream<DocumentWriteOperation> splitWriteOperations(java.io.InputStream input) throws java.lang.Exception
splitWriteOperations
in
interface Splitter<StringHandle>
input
- is the incoming input stream.java.lang.Exception
- if the 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<StringHandle>
input
- is the incoming input stream.splitFilename
- is the name of the input file,
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 the input cannot be
splitpublic java.util.stream.Stream<StringHandle> split(java.io.InputStream input, java.nio.charset.Charset charset) throws java.io.IOException
input
- is the incoming input stream.charset
- is the encoding scheme the document
uses.java.io.IOException
- if the input cannot be
splitpublic java.util.stream.Stream<StringHandle> split(java.io.Reader input) throws java.io.IOException
input
- is the incoming Reader.java.io.IOException
- if the input cannot be
splitpublic LineSplitter.UriMaker getUriMaker()
public void setUriMaker(LineSplitter.UriMaker uriMaker)
uriMaker
- the uriMaker to generate URI of each
split file.Copyright © 2024 MarkLogic Corporation. All Rights Reserved.