public class DefaultScpFileOpener extends AbstractLoggingBean implements ScpFileOpener
Modifier and Type | Field and Description |
---|---|
static DefaultScpFileOpener |
INSTANCE |
log
Constructor and Description |
---|
DefaultScpFileOpener() |
Modifier and Type | Method and Description |
---|---|
ScpSourceStreamResolver |
createScpSourceStreamResolver(Path path) |
ScpTargetStreamResolver |
createScpTargetStreamResolver(Path path) |
InputStream |
openRead(Session session,
Path file,
OpenOption... options)
Create an input stream to read from a file
|
OutputStream |
openWrite(Session session,
Path file,
OpenOption... options)
Create an output stream to write to a file
|
getSimplifiedLogger
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getLocalBasicFileAttributes, getLocalFilePermissions, getLocalFolderChildren, getMatchingFilesToSend, resolveIncomingFilePath, resolveIncomingReceiveLocation, resolveLocalPath, resolveOutgoingFilePath, sendAsDirectory, sendAsRegularFile, updateFileProperties
public static final DefaultScpFileOpener INSTANCE
public InputStream openRead(Session session, Path file, OpenOption... options) throws IOException
ScpFileOpener
openRead
in interface ScpFileOpener
session
- The Session
requesting the accessfile
- The requested local file Path
options
- The OpenOption
s - may be null
/emptyInputStream
never null
IOException
- If failed to open the filepublic OutputStream openWrite(Session session, Path file, OpenOption... options) throws IOException
ScpFileOpener
openWrite
in interface ScpFileOpener
session
- The Session
requesting the accessfile
- The requested local file Path
options
- The OpenOption
s - may be null
/emptyOutputStream
never null
IOException
- If failed to open the filepublic ScpSourceStreamResolver createScpSourceStreamResolver(Path path) throws IOException
createScpSourceStreamResolver
in interface ScpFileOpener
IOException
public ScpTargetStreamResolver createScpTargetStreamResolver(Path path) throws IOException
createScpTargetStreamResolver
in interface ScpFileOpener
IOException
Copyright © 2008–2019 The Apache Software Foundation. All rights reserved.