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, startSubsystemaddEventListener, close, finalizeClose, getLocalChannelId, getLocalPacketSize, getLocalWindow, getRemoteChannelId, getRemotePacketSize, getRemoteWindow, getState, init, init, isClosed, isLocalEOF, isOpen, isRemoteEOF, open, processChannelData, processChannelData, remoteClose, sendChannelData, sendChannelExtData, setLocalEOF, setName, setRemoteEOFpublic 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.IOExceptionpublic void closeFile(SftpFile file) throws java.io.IOException
file - java.io.IOExceptionprotected boolean isValidHandle(byte[] handle)
handle - public int listChildren(SftpFile file, java.util.List children) throws java.io.IOException
file - children - java.io.IOExceptionpublic void makeDirectory(java.lang.String path)
throws java.io.IOException
path - java.io.IOExceptionpublic void recurseMakeDirectory(java.lang.String path)
throws java.io.IOException
path - java.io.IOExceptionpublic SftpFile openDirectory(java.lang.String path) throws java.io.IOException
path - java.io.IOExceptionpublic java.lang.String getDefaultDirectory()
throws java.io.IOException
java.io.IOExceptionpublic java.lang.String getAbsolutePath(java.lang.String path)
throws java.io.IOException
path - java.io.IOExceptionpublic java.lang.String getAbsolutePath(SftpFile file) throws java.io.IOException
file - java.io.IOExceptionpublic SftpFile openFile(java.lang.String filename, int flags) throws java.io.IOException
filename - flags - java.io.IOExceptionpublic SftpFile openFile(java.lang.String absolutePath, int flags, FileAttributes attrs) throws java.io.IOException
absolutePath - flags - attrs - java.io.IOExceptionpublic FileAttributes getAttributes(java.lang.String path) throws java.io.IOException
path - java.io.IOExceptionpublic FileAttributes getAttributes(SftpFile file) throws java.io.IOException
file - java.io.IOExceptionprotected int readFile(byte[] handle,
UnsignedInteger64 offset,
byte[] output,
int off,
int len)
throws java.io.IOException
handle - offset - output - off - len - java.io.IOExceptionpublic void removeDirectory(java.lang.String path)
throws java.io.IOException
path - java.io.IOExceptionpublic void removeFile(java.lang.String filename)
throws java.io.IOException
filename - java.io.IOExceptionpublic void renameFile(java.lang.String oldpath,
java.lang.String newpath)
throws java.io.IOException
oldpath - newpath - java.io.IOExceptionprotected void writeFile(byte[] handle,
UnsignedInteger64 offset,
byte[] data,
int off,
int len)
throws java.io.IOException
handle - offset - data - off - len - java.io.IOExceptionpublic void createSymbolicLink(java.lang.String targetpath,
java.lang.String linkpath)
throws java.io.IOException
targetpath - linkpath - java.io.IOExceptionpublic java.lang.String getSymbolicLinkTarget(java.lang.String linkpath)
throws java.io.IOException
linkpath - java.io.IOExceptionpublic void setAttributes(java.lang.String path,
FileAttributes attrs)
throws java.io.IOException
path - attrs - java.io.IOExceptionpublic void setAttributes(SftpFile file, FileAttributes attrs) throws java.io.IOException
file - attrs - java.io.IOExceptionpublic void changePermissions(SftpFile file, java.lang.String permissions) throws java.io.IOException
file - permissions - java.io.IOExceptionpublic void changePermissions(SftpFile file, int permissions) throws java.io.IOException
file - permissions - java.io.IOExceptionpublic void changePermissions(java.lang.String filename,
int permissions)
throws java.io.IOException
filename - permissions - java.io.IOExceptionpublic void changePermissions(java.lang.String filename,
java.lang.String permissions)
throws java.io.IOException
filename - permissions - java.io.IOExceptionpublic boolean initialize()
throws java.io.IOException
java.io.IOExceptionprotected int getMinimumWindowSpace()
getMinimumWindowSpace in class Channelprotected int getMaximumWindowSpace()
getMaximumWindowSpace in class Channelprotected int getMaximumPacketSize()
getMaximumPacketSize in class ChannelCopyright © 2002-2003 Lee David Painter & Contributors. All Rights Reserved.