java.lang.Object
com.pervasive.datarush.io.FileSplit
com.pervasive.datarush.io.CompressedFileSplit
- All Implemented Interfaces:
DataSplit,Serializable
Describes a range of bytes from a compressed file. As most, if not all
compression schemes cannot support starting decompression at an arbitrary
point, only entire file splits are supported.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCompressedFileSplit(Path path, CompressionFormat format) Creates a split encompassing the entire file named by the path. -
Method Summary
Modifier and TypeMethodDescriptionauthorize(FileClient client) Creates an identical split which will use the specified authorization context for access.Opens the underlying source for access.Methods inherited from class com.pervasive.datarush.io.FileSplit
getEndOffset, getFileClient, getLength, getPath, getStartOffset, openSplit, toString
-
Constructor Details
-
CompressedFileSplit
Creates a split encompassing the entire file named by the path.- Parameters:
path- the file on which the split is definedformat- the compression format of the file
-
-
Method Details
-
openSource
Description copied from interface:DataSplitOpens the underlying source for access. Initially, the stream is positioned at the first byte of the source. UnlikeDataSplit.openSplit(int), the caller is responsible for making sure accesses are aligned to split boundaries. The stream is also unbuffered.This method may be required for dealing with formats which store metadata at the beginning of the file.
- Specified by:
openSourcein interfaceDataSplit- Overrides:
openSourcein classFileSplit- Returns:
- a reader of the data in the underlying source
- Throws:
IOException- if an I/O error occurs opening the underlying source
-
authorize
Description copied from interface:DataSplitCreates an identical split which will use the specified authorization context for access.This method is used by clients of the IO APIs which want to provide an alternative to the OS-level authorization inherited from the JVM's execution environment. Data access methods for the split will use the supplied context.
The authorization context is not a serializable attribute of a data split, as it represents the environment in which the data in accesses, not a property of the data itself. The context is associated with the split as a matter of convenience.
-