public class SftpSubsystem extends Subsystem
FileSystem to
serve files through the SFTP protocol. This implementation currently supports
up to version 3 of the protocol.| Modifier and Type | Field and Description |
|---|---|
static int |
MAX_VERSION |
static String |
SUBSYSTEM_NAME |
| Constructor and Description |
|---|
SftpSubsystem() |
| Modifier and Type | Method and Description |
|---|---|
static String |
formatLongname(SftpFile file)
Format a String with the details of the file.
|
static String |
formatLongname(SftpFileAttributes attrs,
String filename)
Format a String with the details of the file.
|
void |
init(SessionChannel session)
Initialize the subsystem with the current session and configuration.
|
protected void |
onMessageReceived(byte[] msg)
Called when a subsystem message has been extracted from the incoming data
stream.
|
protected void |
onSubsystemFree()
Called to free the subsystem and its resources.
|
getName, processMessage, sendMessagepublic static final int MAX_VERSION
public static final String SUBSYSTEM_NAME
public void init(SessionChannel session) throws IOException, PermissionDeniedException
Subsysteminit in class SubsystemIOExceptionPermissionDeniedExceptionprotected void onSubsystemFree()
onSubsystemFree in class Subsystemprotected void onMessageReceived(byte[] msg)
throws IOException
SubsystemonMessageReceived in class SubsystemIOExceptionpublic static String formatLongname(SftpFile file)
-rwxr-xr-x 1 mjos staff 348911 Mar 25 14:29 t-filexfer
file - com.maverick.ssh.SftpStatusExceptioncom.maverick.ssh.SshExceptionpublic static String formatLongname(SftpFileAttributes attrs, String filename)
-rwxr-xr-x 1 mjos staff 348911 Mar 25 14:29 t-filexfer
attrs - filename - Copyright © 2012. All Rights Reserved.