public class BuiltinStreamProvider extends Object implements FileSystemProvider
stdin provides access to the standard nput stream
(System.in) of the executing process.stdout provides access to the standard output stream
(System.out of the executing process.stderr provides 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 and Description |
|---|
BuiltinStreamProvider()
Creates a new provider for built-in streams.
|
| Modifier and Type | Method and Description |
|---|---|
FileConfiguration |
getConfigurationTemplate()
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.
|
FileSystem |
getFileSystem(FileClient fileClient,
FileConfiguration configuration,
Path path)
Gets the file system identified by the path.
|
Path |
getFileSystemPath(Path path)
Returns the filesystem root path associated with the given path.
|
Path |
getPath(String path)
Gets the path identified by the given string.
|
boolean |
isPathSupported(String path)
Indicates whether the given scheme is handled by the provider.
|
public BuiltinStreamProvider()
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 FileClient
and Paths.
public boolean isPathSupported(String path)
FileSystemProviderisPathSupported in interface FileSystemProviderpath - an identifier for a path schemetrue if this provider handles paths using the
scheme, false otherwise.public FileSystem getFileSystem(FileClient fileClient, FileConfiguration configuration, Path path)
FileSystemProvidergetPath(path).getFileSystem(),
but may be faster.getFileSystem in interface FileSystemProviderfileClient - 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 systempublic Path getPath(String path)
FileSystemProviderFileClient to perform
operations on the files and directories represented by
paths.getPath in interface FileSystemProviderpath - the path name to resolve into a path objectpublic Path getFileSystemPath(Path path)
FileSystemProvidergetFileSystemPath in interface FileSystemProviderpath - the pathpublic FileConfiguration getConfigurationTemplate()
FileSystemProvidergetConfigurationTemplate in interface FileSystemProviderpublic Map<String,FileConfiguration> getDefaultConfiguration()
FileSystemProviderA provider should return a map with entries only for schemes having default configuration; if no schemes do, an empty map should be returned.
getDefaultConfiguration in interface FileSystemProviderCopyright © 2024 Actian Corporation. All rights reserved.