Package net.schmizz.sshj.sftp
Class SFTPFileTransfer.Uploader
- java.lang.Object
-
- net.schmizz.sshj.sftp.SFTPFileTransfer.Uploader
-
- Enclosing class:
- SFTPFileTransfer
private class SFTPFileTransfer.Uploader extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
remote
private LocalSourceFile
source
-
Constructor Summary
Constructors Modifier Constructor Description private
Uploader(LocalSourceFile source, java.lang.String remote)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private FileAttributes
getAttributes(LocalSourceFile local)
private boolean
isDirectory(java.lang.String remote)
private boolean
makeDirIfNotExists(java.lang.String remote)
private java.lang.String
prepareFile(LocalSourceFile local, java.lang.String remote, long byteOffset)
private void
setAttributes(LocalSourceFile local, java.lang.String remotePath)
private void
upload(TransferListener listener, long byteOffset)
private void
upload(TransferListener listener, LocalSourceFile local, java.lang.String remote, long byteOffset)
private java.lang.String
uploadDir(TransferListener listener, LocalSourceFile local, java.lang.String remote)
private java.lang.String
uploadFile(StreamCopier.Listener listener, LocalSourceFile local, java.lang.String remote, long byteOffset)
-
-
-
Field Detail
-
source
private final LocalSourceFile source
-
remote
private final java.lang.String remote
-
-
Constructor Detail
-
Uploader
private Uploader(LocalSourceFile source, java.lang.String remote)
-
-
Method Detail
-
upload
private void upload(TransferListener listener, long byteOffset) throws java.io.IOException
- Throws:
java.io.IOException
-
upload
private void upload(TransferListener listener, LocalSourceFile local, java.lang.String remote, long byteOffset) throws java.io.IOException
- Throws:
java.io.IOException
-
setAttributes
private void setAttributes(LocalSourceFile local, java.lang.String remotePath) throws java.io.IOException
- Throws:
java.io.IOException
-
uploadDir
private java.lang.String uploadDir(TransferListener listener, LocalSourceFile local, java.lang.String remote) throws java.io.IOException
- Throws:
java.io.IOException
-
uploadFile
private java.lang.String uploadFile(StreamCopier.Listener listener, LocalSourceFile local, java.lang.String remote, long byteOffset) throws java.io.IOException
- Throws:
java.io.IOException
-
makeDirIfNotExists
private boolean makeDirIfNotExists(java.lang.String remote) throws java.io.IOException
- Throws:
java.io.IOException
-
isDirectory
private boolean isDirectory(java.lang.String remote) throws java.io.IOException
- Throws:
java.io.IOException
-
prepareFile
private java.lang.String prepareFile(LocalSourceFile local, java.lang.String remote, long byteOffset) throws java.io.IOException
- Throws:
java.io.IOException
-
getAttributes
private FileAttributes getAttributes(LocalSourceFile local) throws java.io.IOException
- Throws:
java.io.IOException
-
-