net.schmizz.sshj.sftp
Class SFTPEngine
java.lang.Object
net.schmizz.sshj.sftp.SFTPEngine
- All Implemented Interfaces:
- Closeable, Requester
public class SFTPEngine
- extends Object
- implements Requester, Closeable
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MAX_SUPPORTED_VERSION
public static final int MAX_SUPPORTED_VERSION
- See Also:
- Constant Field Values
DEFAULT_TIMEOUT
public static final int DEFAULT_TIMEOUT
- See Also:
- Constant Field Values
log
protected final org.slf4j.Logger log
- Logger
timeout
protected volatile int timeout
pathHelper
protected final PathHelper pathHelper
sub
protected final Session.Subsystem sub
reader
protected final PacketReader reader
out
protected final OutputStream out
reqID
protected long reqID
operativeVersion
protected int operativeVersion
serverExtensions
protected final Map<String,String> serverExtensions
SFTPEngine
public SFTPEngine(SessionFactory ssh)
throws SSHException
- Throws:
SSHException
SFTPEngine
public SFTPEngine(SessionFactory ssh,
String pathSep)
throws SSHException
- Throws:
SSHException
init
public SFTPEngine init()
throws IOException
- Throws:
IOException
getSubsystem
public Session.Subsystem getSubsystem()
getOperativeProtocolVersion
public int getOperativeProtocolVersion()
newExtendedRequest
public Request newExtendedRequest(String reqName)
getPathHelper
public PathHelper getPathHelper()
- Specified by:
getPathHelper
in interface Requester
newRequest
public Request newRequest(PacketType type)
- Specified by:
newRequest
in interface Requester
doRequest
public Response doRequest(Request req)
throws IOException
- Specified by:
doRequest
in interface Requester
- Throws:
IOException
open
public RemoteFile open(String path,
Set<OpenMode> modes,
FileAttributes fa)
throws IOException
- Throws:
IOException
open
public RemoteFile open(String filename,
Set<OpenMode> modes)
throws IOException
- Throws:
IOException
open
public RemoteFile open(String filename)
throws IOException
- Throws:
IOException
openDir
public RemoteDirectory openDir(String path)
throws IOException
- Throws:
IOException
setAttributes
public void setAttributes(String path,
FileAttributes attrs)
throws IOException
- Throws:
IOException
readLink
public String readLink(String path)
throws IOException
- Throws:
IOException
makeDir
public void makeDir(String path,
FileAttributes attrs)
throws IOException
- Throws:
IOException
makeDir
public void makeDir(String path)
throws IOException
- Throws:
IOException
symlink
public void symlink(String linkpath,
String targetpath)
throws IOException
- Throws:
IOException
remove
public void remove(String filename)
throws IOException
- Throws:
IOException
removeDir
public void removeDir(String path)
throws IOException
- Throws:
IOException
stat
public FileAttributes stat(String path)
throws IOException
- Throws:
IOException
lstat
public FileAttributes lstat(String path)
throws IOException
- Throws:
IOException
rename
public void rename(String oldPath,
String newPath)
throws IOException
- Throws:
IOException
canonicalize
public String canonicalize(String path)
throws IOException
- Throws:
IOException
setTimeout
public void setTimeout(int timeout)
getTimeout
public int getTimeout()
close
public void close()
throws IOException
- Specified by:
close
in interface Closeable
- Throws:
IOException
stat
protected FileAttributes stat(PacketType pt,
String path)
throws IOException
- Throws:
IOException
readSingleName
protected static String readSingleName(Response res)
throws IOException
- Throws:
IOException
transmit
protected void transmit(SFTPPacket<Request> payload)
throws IOException
- Throws:
IOException
Copyright © 2009-2012. All Rights Reserved.