Class SFTPEngine
java.lang.Object
net.schmizz.sshj.sftp.SFTPEngine
- All Implemented Interfaces:
Closeable, AutoCloseable, Requester
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intprotected final org.slf4j.Loggerprotected final LoggerFactoryLoggerstatic final intprotected intprotected final OutputStreamprotected final PathHelperprotected final PacketReaderprotected longprotected final Session.Subsystemprotected int -
Constructor Summary
ConstructorsConstructorDescriptionSFTPEngine(SessionFactory ssh) SFTPEngine(SessionFactory ssh, String pathSep) -
Method Summary
Modifier and TypeMethodDescriptioncanonicalize(String path) voidclose()protected LoggerFactoryintgetServerExtensionData(String extension, String domain) intinit()protected SFTPEngineinit(int requestedVersion) Introduced for internal use by testcases.voidvoidmakeDir(String path, FileAttributes attrs) newExtendedRequest(String reqName) newRequest(PacketType type) open(String path, Set<OpenMode> modes, FileAttributes fa) protected static StringreadSingleName(Response res) Using UTF-8protected static StringreadSingleName(Response res, Charset charset) Using any character setvoidvoidvoidrename(String oldPath, String newPath, Set<RenameFlags> flags) voidsetAttributes(String path, FileAttributes attrs) voidsetTimeoutMs(int timeoutMs) protected FileAttributesstat(PacketType pt, String path) booleansupportsServerExtension(String extension, String domain) voidprotected voidtransmit(SFTPPacket<Request> payload)
-
Field Details
-
MAX_SUPPORTED_VERSION
public static final int MAX_SUPPORTED_VERSION- See Also:
-
DEFAULT_TIMEOUT_MS
public static final int DEFAULT_TIMEOUT_MS- See Also:
-
loggerFactory
Logger -
log
protected final org.slf4j.Logger log -
timeoutMs
protected volatile int timeoutMs -
pathHelper
-
sub
-
reader
-
out
-
reqID
protected long reqID -
operativeVersion
protected int operativeVersion -
serverExtensions
-
-
Constructor Details
-
SFTPEngine
- Throws:
SSHException
-
SFTPEngine
- Throws:
SSHException
-
-
Method Details
-
init
- Throws:
IOException
-
init
Introduced for internal use by testcases.- Parameters:
requestedVersion-- Throws:
IOException
-
getSubsystem
-
getOperativeProtocolVersion
public int getOperativeProtocolVersion() -
supportsServerExtension
-
getServerExtensionData
-
newExtendedRequest
-
getPathHelper
- Specified by:
getPathHelperin interfaceRequester
-
newRequest
- Specified by:
newRequestin interfaceRequester
-
request
- Specified by:
requestin interfaceRequester- Throws:
IOException
-
open
- Throws:
IOException
-
open
- Throws:
IOException
-
open
- Throws:
IOException
-
openDir
- Throws:
IOException
-
setAttributes
- Throws:
IOException
-
readLink
- Throws:
IOException
-
makeDir
- Throws:
IOException
-
makeDir
- Throws:
IOException
-
symlink
- Throws:
IOException
-
remove
- Throws:
IOException
-
removeDir
- Throws:
IOException
-
stat
- Throws:
IOException
-
lstat
- Throws:
IOException
-
rename
- Throws:
IOException
-
canonicalize
- Throws:
IOException
-
setTimeoutMs
public void setTimeoutMs(int timeoutMs) -
getTimeoutMs
public int getTimeoutMs()- Specified by:
getTimeoutMsin interfaceRequester
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
getLoggerFactory
-
stat
- Throws:
IOException
-
readSingleName
Using UTF-8- Throws:
IOException
-
readSingleName
Using any character set- Throws:
IOException
-
transmit
- Throws:
IOException
-