public class RemoteFile extends RemoteResource
| Modifier and Type | Class and Description |
|---|---|
class |
RemoteFile.ReadAheadRemoteFileInputStream |
class |
RemoteFile.RemoteFileInputStream |
class |
RemoteFile.RemoteFileOutputStream |
handle, log, path, requester| Constructor and Description |
|---|
RemoteFile(Requester requester,
java.lang.String path,
byte[] handle) |
| Modifier and Type | Method and Description |
|---|---|
protected 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) |
FileAttributes |
fetchAttributes() |
int |
getOutgoingPacketOverhead() |
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) |
close, getPath, newRequest, toStringpublic RemoteFile(Requester requester, java.lang.String path, byte[] handle)
public FileAttributes fetchAttributes() throws java.io.IOException
java.io.IOExceptionpublic long length()
throws java.io.IOException
java.io.IOExceptionpublic void setLength(long len)
throws java.io.IOException
java.io.IOExceptionpublic int read(long fileOffset,
byte[] to,
int offset,
int len)
throws java.io.IOException
java.io.IOExceptionprotected Promise<Response,SFTPException> asyncRead(long fileOffset, int len) throws java.io.IOException
java.io.IOExceptionprotected int checkReadResponse(Response res, byte[] to, int offset) throws Buffer.BufferException, SFTPException
Buffer.BufferExceptionSFTPExceptionpublic void write(long fileOffset,
byte[] data,
int off,
int len)
throws java.io.IOException
java.io.IOExceptionprotected Promise<Response,SFTPException> asyncWrite(long fileOffset, byte[] data, int off, int len) throws java.io.IOException
java.io.IOExceptionpublic void setAttributes(FileAttributes attrs) throws java.io.IOException
java.io.IOExceptionpublic int getOutgoingPacketOverhead()