public class SftpSubsystemClient extends SubsystemChannel
Modifier and Type | Field and Description |
---|---|
static int |
OPEN_APPEND |
static int |
OPEN_CREATE |
static int |
OPEN_EXCLUSIVE |
static int |
OPEN_READ |
static int |
OPEN_TRUNCATE |
static int |
OPEN_WRITE |
static int |
VERSION_1 |
static int |
VERSION_2 |
static int |
VERSION_3 |
static int |
VERSION_4 |
connection, localChannelId, localPacketSize, localWindow, remoteChannelId, remotePacketSize, remoteWindow, state
Constructor and Description |
---|
SftpSubsystemClient()
Creates a new SftpSubsystemClient object.
|
Modifier and Type | Method and Description |
---|---|
protected long |
availableWindowSpace() |
void |
changePermissions(SftpFile file,
int permissions) |
void |
changePermissions(SftpFile file,
java.lang.String permissions) |
void |
changePermissions(java.lang.String filename,
int permissions) |
void |
changePermissions(java.lang.String filename,
java.lang.String permissions) |
void |
closeFile(SftpFile file) |
protected void |
closeHandle(byte[] handle) |
void |
createSymbolicLink(java.lang.String targetpath,
java.lang.String linkpath) |
java.lang.String |
getAbsolutePath(SftpFile file) |
java.lang.String |
getAbsolutePath(java.lang.String path) |
FileAttributes |
getAttributes(SftpFile file) |
FileAttributes |
getAttributes(java.lang.String path) |
java.lang.String |
getDefaultDirectory() |
protected int |
getMaximumPacketSize() |
protected int |
getMaximumWindowSpace() |
protected int |
getMinimumWindowSpace() |
java.lang.String |
getName() |
java.lang.String |
getSymbolicLinkTarget(java.lang.String linkpath) |
boolean |
initialize() |
protected boolean |
isValidHandle(byte[] handle) |
int |
listChildren(SftpFile file,
java.util.List children) |
void |
makeDirectory(java.lang.String path) |
protected long |
maximumPacketSize() |
SftpFile |
openDirectory(java.lang.String path) |
SftpFile |
openFile(java.lang.String filename,
int flags) |
SftpFile |
openFile(java.lang.String absolutePath,
int flags,
FileAttributes attrs) |
protected int |
readFile(byte[] handle,
UnsignedInteger64 offset,
byte[] output,
int off,
int len) |
void |
recurseMakeDirectory(java.lang.String path) |
void |
removeDirectory(java.lang.String path) |
void |
removeFile(java.lang.String filename) |
void |
renameFile(java.lang.String oldpath,
java.lang.String newpath) |
void |
setAttributes(SftpFile file,
FileAttributes attrs) |
void |
setAttributes(java.lang.String path,
FileAttributes attrs) |
protected void |
writeFile(byte[] handle,
UnsignedInteger64 offset,
byte[] data,
int off,
int len) |
getChannelConfirmationData, getChannelOpenData, getChannelType, onChannelClose, onChannelData, onChannelEOF, onChannelExtData, onChannelOpen, onChannelRequest, sendMessage, startSubsystem
addEventListener, close, finalizeClose, getLocalChannelId, getLocalPacketSize, getLocalWindow, getRemoteChannelId, getRemotePacketSize, getRemoteWindow, getState, init, init, isClosed, isLocalEOF, isOpen, isRemoteEOF, open, processChannelData, processChannelData, remoteClose, sendChannelData, sendChannelExtData, setLocalEOF, setName, setRemoteEOF
public static final int OPEN_READ
public static final int OPEN_WRITE
public static final int OPEN_APPEND
public static final int OPEN_CREATE
public static final int OPEN_TRUNCATE
public static final int OPEN_EXCLUSIVE
public static final int VERSION_1
public static final int VERSION_2
public static final int VERSION_3
public static final int VERSION_4
public SftpSubsystemClient()
protected long availableWindowSpace()
protected long maximumPacketSize()
protected void closeHandle(byte[] handle) throws java.io.IOException
handle
- java.io.IOException
public void closeFile(SftpFile file) throws java.io.IOException
file
- java.io.IOException
protected boolean isValidHandle(byte[] handle)
handle
- public int listChildren(SftpFile file, java.util.List children) throws java.io.IOException
file
- children
- java.io.IOException
public void makeDirectory(java.lang.String path) throws java.io.IOException
path
- java.io.IOException
public void recurseMakeDirectory(java.lang.String path) throws java.io.IOException
path
- java.io.IOException
public SftpFile openDirectory(java.lang.String path) throws java.io.IOException
path
- java.io.IOException
public java.lang.String getDefaultDirectory() throws java.io.IOException
java.io.IOException
public java.lang.String getAbsolutePath(java.lang.String path) throws java.io.IOException
path
- java.io.IOException
public java.lang.String getAbsolutePath(SftpFile file) throws java.io.IOException
file
- java.io.IOException
public SftpFile openFile(java.lang.String filename, int flags) throws java.io.IOException
filename
- flags
- java.io.IOException
public SftpFile openFile(java.lang.String absolutePath, int flags, FileAttributes attrs) throws java.io.IOException
absolutePath
- flags
- attrs
- java.io.IOException
public FileAttributes getAttributes(java.lang.String path) throws java.io.IOException
path
- java.io.IOException
public FileAttributes getAttributes(SftpFile file) throws java.io.IOException
file
- java.io.IOException
protected int readFile(byte[] handle, UnsignedInteger64 offset, byte[] output, int off, int len) throws java.io.IOException
handle
- offset
- output
- off
- len
- java.io.IOException
public void removeDirectory(java.lang.String path) throws java.io.IOException
path
- java.io.IOException
public void removeFile(java.lang.String filename) throws java.io.IOException
filename
- java.io.IOException
public void renameFile(java.lang.String oldpath, java.lang.String newpath) throws java.io.IOException
oldpath
- newpath
- java.io.IOException
protected void writeFile(byte[] handle, UnsignedInteger64 offset, byte[] data, int off, int len) throws java.io.IOException
handle
- offset
- data
- off
- len
- java.io.IOException
public void createSymbolicLink(java.lang.String targetpath, java.lang.String linkpath) throws java.io.IOException
targetpath
- linkpath
- java.io.IOException
public java.lang.String getSymbolicLinkTarget(java.lang.String linkpath) throws java.io.IOException
linkpath
- java.io.IOException
public void setAttributes(java.lang.String path, FileAttributes attrs) throws java.io.IOException
path
- attrs
- java.io.IOException
public void setAttributes(SftpFile file, FileAttributes attrs) throws java.io.IOException
file
- attrs
- java.io.IOException
public void changePermissions(SftpFile file, java.lang.String permissions) throws java.io.IOException
file
- permissions
- java.io.IOException
public void changePermissions(SftpFile file, int permissions) throws java.io.IOException
file
- permissions
- java.io.IOException
public void changePermissions(java.lang.String filename, int permissions) throws java.io.IOException
filename
- permissions
- java.io.IOException
public void changePermissions(java.lang.String filename, java.lang.String permissions) throws java.io.IOException
filename
- permissions
- java.io.IOException
public boolean initialize() throws java.io.IOException
java.io.IOException
protected int getMinimumWindowSpace()
getMinimumWindowSpace
in class Channel
protected int getMaximumWindowSpace()
getMaximumWindowSpace
in class Channel
protected int getMaximumPacketSize()
getMaximumPacketSize
in class Channel
Copyright © 2002-2003 Lee David Painter & Contributors. All Rights Reserved.