public class MultiFileConcatSource
extends java.lang.Object
| Constructor and Description |
|---|
MultiFileConcatSource()
Create an empty builder
|
| Modifier and Type | Method and Description |
|---|---|
MultiFileConcatSource |
add(java.io.File file)
Append the contents of a file to this source
|
MultiFileConcatSource |
add(java.io.InputStream is)
Append the contents of an input stream to this source
|
MultiFileConcatSource |
add(java.nio.file.Path fileName)
Append the contents of a file to this source
|
MultiFileConcatSource |
add(java.lang.String fileName)
Append the contents of a file to this source
|
MultiFileConcatSource |
addBytes(byte[] bytes)
Append bytes to the input source
|
MultiFileConcatSource |
alias(java.lang.String alias)
Add alias to the input source as metadata
|
java.io.ByteArrayInputStream |
build()
Builds an input stream from the currently accumulated contents
|
MultiFileConcatSource |
creationDate(java.util.Date date)
Add creationDate to the input source as metadata
|
MultiFileConcatSource |
creationDate(java.time.Instant instant)
Add creationDate to the input source as metadata
|
static MultiFileConcatSource |
empty()
Creates an empty source (files may be added later)
|
static MultiFileConcatSource |
fromFiles(java.io.File... paths)
Creates a new builder from multiple files
|
static MultiFileConcatSource |
fromFiles(java.nio.file.Path... paths)
Creates a new builder from multiple files
|
static MultiFileConcatSource |
fromFiles(java.lang.String... paths)
Creates a new builder from multiple files
|
int |
size()
Gets the current size of the building buffer
|
public MultiFileConcatSource add(java.io.InputStream is) throws java.io.IOException
is - the source input streamjava.io.IOException - in case of errorpublic MultiFileConcatSource add(java.io.File file) throws java.io.IOException
file - reference to the input filejava.io.IOException - in case of errorpublic MultiFileConcatSource add(java.nio.file.Path fileName) throws java.io.IOException
fileName - the path of the input filejava.io.IOException - in case of errorpublic MultiFileConcatSource add(java.lang.String fileName) throws java.io.IOException
fileName - the path of the input filejava.io.IOException - in case of errorpublic MultiFileConcatSource addBytes(byte[] bytes) throws java.io.IOException
bytes - the raw bytes to addjava.io.IOException - in case of errorpublic MultiFileConcatSource alias(java.lang.String alias) throws java.io.IOException
alias - the alias to addjava.io.IOException - in case of errorpublic MultiFileConcatSource creationDate(java.util.Date date) throws java.io.IOException
date - the date to addjava.io.IOException - in case of errorpublic MultiFileConcatSource creationDate(java.time.Instant instant) throws java.io.IOException
instant - the date to addjava.io.IOException - in case of errorpublic int size()
public java.io.ByteArrayInputStream build()
public static MultiFileConcatSource empty()
public static MultiFileConcatSource fromFiles(java.io.File... paths) throws java.io.IOException
paths - list of filenames as Filejava.io.IOException - in case of errorpublic static MultiFileConcatSource fromFiles(java.nio.file.Path... paths) throws java.io.IOException
paths - list of filenames as Pathjava.io.IOException - in case of errorpublic static MultiFileConcatSource fromFiles(java.lang.String... paths) throws java.io.IOException
paths - list of filenames as Stringjava.io.IOException - in case of error