Package net.schmizz.sshj.sftp
Class RemoteFile
java.lang.Object
net.schmizz.sshj.sftp.RemoteResource
net.schmizz.sshj.sftp.RemoteFile
- All Implemented Interfaces:
Closeable
,AutoCloseable
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclass
class
class
-
Field Summary
Fields inherited from class net.schmizz.sshj.sftp.RemoteResource
handle, log, path, requester
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Promise
<Response, SFTPException> asyncRead
(long fileOffset, int len) protected Promise
<Response, SFTPException> asyncWrite
(long fileOffset, byte[] data, int off, int len) protected int
checkReadResponse
(Response res, byte[] to, int offset) private void
checkWriteResponse
(Promise<Response, SFTPException> responsePromise) int
long
length()
int
read
(long fileOffset, byte[] to, int offset, int len) void
setAttributes
(FileAttributes attrs) void
setLength
(long len) void
write
(long fileOffset, byte[] data, int off, int len) Methods inherited from class net.schmizz.sshj.sftp.RemoteResource
close, getPath, newRequest, toString
-
Constructor Details
-
RemoteFile
-
-
Method Details
-
fetchAttributes
- Throws:
IOException
-
length
- Throws:
IOException
-
setLength
- Throws:
IOException
-
read
- Throws:
IOException
-
asyncRead
- Throws:
IOException
-
checkReadResponse
protected int checkReadResponse(Response res, byte[] to, int offset) throws Buffer.BufferException, SFTPException - Throws:
Buffer.BufferException
SFTPException
-
write
- Throws:
IOException
-
asyncWrite
protected Promise<Response,SFTPException> asyncWrite(long fileOffset, byte[] data, int off, int len) throws IOException - Throws:
IOException
-
checkWriteResponse
private void checkWriteResponse(Promise<Response, SFTPException> responsePromise) throws SFTPException- Throws:
SFTPException
-
setAttributes
- Throws:
IOException
-
getOutgoingPacketOverhead
public int getOutgoingPacketOverhead()
-