- java.lang.Object
-
- com.pervasive.datarush.io.BuiltinStreamProvider
-
- All Implemented Interfaces:
FileSystemProvider
public class BuiltinStreamProvider extends Object implements FileSystemProvider
Provides access to built-in data streams. There are three schemes provided for acessing built-in stream:stdinprovides access to the standard nput stream (System.in) of the executing process.stdoutprovides access to the standard output stream (System.outof the executing process.stderrprovides access to the standard error stream of the executing process.
The built-in streams do not support hierarchical paths; it is not considered an error to provide additional data in the path beyond the scheme, but it will be ignored.
-
-
Constructor Summary
Constructors Constructor Description BuiltinStreamProvider()Creates a new provider for built-in streams.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FileConfigurationgetConfigurationTemplate()Returns a non-populated configuration object to server as a template that the user must fill-in.Map<String,FileConfiguration>getDefaultConfiguration()Gets default configuration for the schemes handled by the provider.FileSystemgetFileSystem(FileClient fileClient, FileConfiguration configuration, Path path)Gets the file system identified by the path.PathgetFileSystemPath(Path path)Returns the filesystem root path associated with the given path.PathgetPath(String path)Gets the path identified by the given string.booleanisPathSupported(String path)Indicates whether the given scheme is handled by the provider.
-
-
-
Constructor Detail
-
BuiltinStreamProvider
public BuiltinStreamProvider()
Creates a new provider for built-in streams.This constructor is public as a matter of implementation only. Users should not construct a provider directly, but instead use the static methods contained in
FileClientandPaths.
-
-
Method Detail
-
isPathSupported
public boolean isPathSupported(String path)
Description copied from interface:FileSystemProviderIndicates whether the given scheme is handled by the provider.- Specified by:
isPathSupportedin interfaceFileSystemProvider- Parameters:
path- an identifier for a path scheme- Returns:
trueif this provider handles paths using the scheme,falseotherwise.
-
getFileSystem
public FileSystem getFileSystem(FileClient fileClient, FileConfiguration configuration, Path path)
Description copied from interface:FileSystemProviderGets the file system identified by the path. The path identifies a file on the file system; the file's file system is returned. This is equivalent to callinggetPath(path).getFileSystem(), but may be faster.- Specified by:
getFileSystemin interfaceFileSystemProvider- Parameters:
fileClient- a file client. most implementations will ignore this parameter. "meta-filesystems" ( those than can span filesystems ) may need the file client.configuration- the configuration for this filesystempath- a path identifying a file on the file system- Returns:
- the requested file system object
-
getPath
public Path getPath(String path)
Description copied from interface:FileSystemProviderGets the path identified by the given string. The resulting path represents a location in an abstract file system. Use the methods inFileClientto perform operations on the files and directories represented by paths.- Specified by:
getPathin interfaceFileSystemProvider- Parameters:
path- the path name to resolve into a path object- Returns:
- the requested path object
-
getFileSystemPath
public Path getFileSystemPath(Path path)
Description copied from interface:FileSystemProviderReturns the filesystem root path associated with the given path.- Specified by:
getFileSystemPathin interfaceFileSystemProvider- Parameters:
path- the path- Returns:
- the root path
-
getConfigurationTemplate
public FileConfiguration getConfigurationTemplate()
Description copied from interface:FileSystemProviderReturns a non-populated configuration object to server as a template that the user must fill-in.- Specified by:
getConfigurationTemplatein interfaceFileSystemProvider- Returns:
- a configuration template
-
getDefaultConfiguration
public Map<String,FileConfiguration> getDefaultConfiguration()
Description copied from interface:FileSystemProviderGets default configuration for the schemes handled by the provider. Default configuration is inherited from the execution environment.A provider should return a map with entries only for schemes having default configuration; if no schemes do, an empty map should be returned.
- Specified by:
getDefaultConfigurationin interfaceFileSystemProvider- Returns:
- a mapping of schemes to default configuration
-
-