public class RemoteFileServer extends Object
| Constructor and Description |
|---|
RemoteFileServer(String descName,
String mountPoint)
Create an instance of a remote file server with a given cache name.The cache name will be used as the mount point for a local cache.
|
RemoteFileServer(String descName,
String mountPoint,
Properties p) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the connection to the underlying FileSystem.
|
boolean |
exists(Path path)
Check if a file exists in the remote file server
|
BufferedWriter |
getBufferedWriter(Path path,
OpenOption... options)
Get an BufferedWriter for writing data for a given Path and OpenOptions.
|
FileSystem |
getFileSystem()
Get the underlying FileSystem.
|
InputStream |
getInputStream(Path path,
OpenOption... options)
Get an InputStream for reading data for a given Path and OpenOptions.
|
OutputStream |
getOutputStream(Path path,
OpenOption... options)
Get an OutputStream for writing data for a given Path and OpenOptions.
|
public RemoteFileServer(String descName, String mountPoint)
descName - The description name for the agent using this classmountPoint - The mount pointpublic RemoteFileServer(String descName, String mountPoint, Properties p)
public InputStream getInputStream(Path path, OpenOption... options) throws IOException
path - The Path of the file to open.options - The OpenOption array to open the file with.IOExceptionpublic boolean exists(Path path)
path - The path to check.public BufferedWriter getBufferedWriter(Path path, OpenOption... options) throws IOException
path - The Path of the file to open.options - The OpenOption array to open the file with.IOExceptionpublic OutputStream getOutputStream(Path path, OpenOption... options) throws IOException
path - The Path of the file to open.options - The OpenOption array to open the file with.IOExceptionpublic FileSystem getFileSystem()
public void close()
Copyright © 2023 LSST. All rights reserved.