Logo Search packages:      
Sourcecode: jenkins-trilead-ssh2 version File versions  Download package

Public Member Functions | Package Attributes | Private Member Functions

com::trilead::ssh2::SFTPv3Client Class Reference

Collaboration diagram for com::trilead::ssh2::SFTPv3Client:
Collaboration graph
[legend]

List of all members.

Public Member Functions

SFTPv3FileAttributes _stat (String path) throws IOException
String canonicalPath (String path) throws IOException
void chmod (String path, int permissions) throws IOException
void close ()
void closeFile (SFTPv3FileHandle handle) throws IOException
SFTPv3FileHandle createFile (String fileName) throws IOException
SFTPv3FileHandle createFile (String fileName, SFTPv3FileAttributes attr) throws IOException
SFTPv3FileHandle createFileTruncate (String fileName) throws IOException
SFTPv3FileHandle createFileTruncate (String fileName, SFTPv3FileAttributes attr) throws IOException
void createSymlink (String src, String target) throws IOException
boolean exists (String path) throws IOException
void fsetstat (SFTPv3FileHandle handle, SFTPv3FileAttributes attr) throws IOException
SFTPv3FileAttributes fstat (SFTPv3FileHandle handle) throws IOException
String getCharset ()
int getProtocolVersion ()
Vector ls (String dirName) throws IOException
SFTPv3FileAttributes lstat (String path) throws IOException
void mkdir (String dirName, int posixPermissions) throws IOException
void mkdirs (String path, int posixPermission) throws IOException
void mv (String oldPath, String newPath) throws IOException
SFTPv3FileHandle openFileRO (String fileName) throws IOException
SFTPv3FileHandle openFileRW (String fileName) throws IOException
InputStream read (String file) throws IOException
int read (SFTPv3FileHandle handle, long fileOffset, byte[] dst, int dstoff, int len) throws IOException
String readLink (String path) throws IOException
void rm (String fileName) throws IOException
void rmdir (String dirName) throws IOException
void setCharset (String charset) throws IOException
void setstat (String path, SFTPv3FileAttributes attr) throws IOException
 SFTPv3Client (Connection conn, PrintStream debug) throws IOException
 SFTPv3Client (Connection conn) throws IOException
SFTPv3FileAttributes stat (String path) throws IOException
void write (SFTPv3FileHandle handle, long fileOffset, byte[] src, int srcoff, int len) throws IOException
OutputStream writeToFile (String path) throws IOException

Package Attributes

String charsetName = null
final Connection conn
final PrintStream debug
boolean flag_closed = false
InputStream is
int next_request_id = 1000
OutputStream os
int protocol_version = 0
HashMap server_extensions = new HashMap()
final Session sess

Private Member Functions

final void checkHandleValidAndOpen (SFTPv3FileHandle handle) throws IOException
final void closeHandle (byte[] handle) throws IOException
byte[] createAttrs (SFTPv3FileAttributes attr)
final String expandString (byte[] b, int off, int len)
void expectStatusOKMessage (int id) throws IOException
final int generateNextRequestID ()
void init () throws IOException
final byte[] openDirectory (String path) throws IOException
SFTPv3FileHandle openFile (String fileName, int flags, SFTPv3FileAttributes attr) throws IOException
SFTPv3FileAttributes readAttrs (TypesReader tr) throws IOException
final void readBytes (byte[] buff, int pos, int len) throws IOException
final byte[] receiveMessage (int maxlen) throws IOException
final Vector scanDirectory (byte[] handle) throws IOException
final void sendMessage (int type, int requestId, byte[] msg, int off, int len) throws IOException
final void sendMessage (int type, int requestId, byte[] msg) throws IOException
SFTPv3FileAttributes statBoth (String path, int statMethod) throws IOException

Detailed Description

A SFTPv3Client represents a SFTP (protocol version 3) client connection tunnelled over a SSH-2 connection. This is a very simple (synchronous) implementation.

Basically, most methods in this class map directly to one of the packet types described in draft-ietf-secsh-filexfer-02.txt.

Note: this is experimental code.

Error handling: the methods of this class throw IOExceptions. However, unless there is catastrophic failure, exceptions of the type SFTPv3Client will be thrown (a subclass of IOException). Therefore, you can implement more verbose behavior by checking if a thrown exception if of this type. If yes, then you can cast the exception and access detailed information about the failure.

Notes about file names, directory names and paths, copy-pasted from the specs:

If you are still not tired then please go on and read the comment for setCharset(String).

Author:
Christian Plattner, plattner@trilead.com
Version:
Id:
SFTPv3Client.java,v 1.2 2008/03/03 07:01:36 cplattne Exp

Definition at line 61 of file SFTPv3Client.java.


The documentation for this class was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index