public class ConcatenatedByteSource extends Object implements ByteSource
| Constructor and Description |
|---|
ConcatenatedByteSource(List<? extends ByteSource> sources)
Creates a data source representing the concatenation of
the specified sources.
|
| Modifier and Type | Method and Description |
|---|---|
ByteSource |
authorize(FileClient client)
Creates a new source with the same properties, but using the
specified authorization.
|
SplitIterator |
generateSplits(SplitOptions options)
Gets an iterator producing a set of
DataSplit objects
covering the source. |
static ByteSource |
getConcatenatedSource(List<Path> paths)
Creates a source which is the concatenation of the specified paths,
in order.
|
static ByteSource |
getConcatenatedSource(List<Path> paths,
UnreadableSourceAction onUnreadable)
Creates a source which is the concatenation of the specified paths,
in order.
|
List<ByteSource> |
getSources()
Gets the sources which comprise the combined source.
|
InputStream |
open()
Opens the source for reading.
|
ByteSource |
validate()
Performs validation of the source configuration.
|
public ConcatenatedByteSource(List<? extends ByteSource> sources)
sources - the data sources to concatenatepublic List<ByteSource> getSources()
public ByteSource authorize(FileClient client)
ByteSourceIf a source is supposed to be used with a specific authorization context, this method should be called to produce a new source to use.
authorize in interface ByteSourceclient - the authorization context to use for accesspublic InputStream open() throws IOException
ByteSourceInputStream.open in interface InputStreamSupplieropen in interface ByteSourceIOException - if an I/O error occurs while opening the sourcepublic SplitIterator generateSplits(SplitOptions options) throws IOException
ByteSourceDataSplit objects
covering the source. The source is split as requested
in the specified options, within the source's ability to
meet the requirements.generateSplits in interface ByteSourceoptions - configurable options to use in generating
the splitsIOException - if an I/O error occurs while generating splitspublic ByteSource validate() throws IOException
ByteSourcevalidate in interface ByteSourceIOException - if an I/O error occurs while
validating the sourcepublic static ByteSource getConcatenatedSource(List<Path> paths)
paths - the paths to concatenateBasicByteSourcepublic static ByteSource getConcatenatedSource(List<Path> paths, UnreadableSourceAction onUnreadable)
paths - the paths to concatenateonUnreadable - specifies the action to take for unreadable
filesBasicByteSourceCopyright © 2019 Actian Corporation. All rights reserved.