public class DefaultScpFileOpener extends org.apache.sshd.common.util.logging.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(Session session,
Path path) |
ScpTargetStreamResolver |
createScpTargetStreamResolver(Session session,
Path path) |
InputStream |
openRead(Session session,
Path file,
long size,
Set<PosixFilePermission> permissions,
OpenOption... options)
Create an input stream to read from a file
|
OutputStream |
openWrite(Session session,
Path file,
long size,
Set<PosixFilePermission> permissions,
OpenOption... options)
Create an output stream to write to a file
|
protected OpenOption[] |
resolveOpenOptions(Session session,
Path file,
long size,
Set<PosixFilePermission> permissions,
OpenOption... options) |
debug, debug, debug, debug, debug, error, error, error, error, error, getSimplifiedLogger, info, info, warn, warn, warn, warn, warn, warn, warn, warnclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcloseRead, closeWrite, getLocalBasicFileAttributes, getLocalFilePermissions, getLocalFolderChildren, getMatchingFilesToSend, resolveIncomingFilePath, resolveIncomingReceiveLocation, resolveLocalPath, resolveOutgoingFilePath, sendAsDirectory, sendAsRegularFile, updateFilePropertiespublic static final DefaultScpFileOpener INSTANCE
public InputStream openRead(Session session, Path file, long size, Set<PosixFilePermission> permissions, OpenOption... options) throws IOException
ScpFileOpeneropenRead in interface ScpFileOpenersession - The Session requesting the accessfile - The requested local file Pathsize - The expected transfer bytes countpermissions - The requested file permissionsoptions - The OpenOptions - may be null/emptyInputStream never nullIOException - If failed to open the filepublic OutputStream openWrite(Session session, Path file, long size, Set<PosixFilePermission> permissions, OpenOption... options) throws IOException
ScpFileOpeneropenWrite in interface ScpFileOpenersession - The Session requesting the accessfile - The requested local file Pathsize - The expected transfer byte countpermissions - The requested file permissionsoptions - The OpenOptions - may be null/emptyOutputStream never nullIOException - If failed to open the fileprotected OpenOption[] resolveOpenOptions(Session session, Path file, long size, Set<PosixFilePermission> permissions, OpenOption... options) throws IOException
IOExceptionpublic ScpSourceStreamResolver createScpSourceStreamResolver(Session session, Path path) throws IOException
createScpSourceStreamResolver in interface ScpFileOpenerIOExceptionpublic ScpTargetStreamResolver createScpTargetStreamResolver(Session session, Path path) throws IOException
createScpTargetStreamResolver in interface ScpFileOpenerIOExceptionCopyright © 2018–2021 The Apache Software Foundation. All rights reserved.