com.mindbright.ssh2
protected static final class SSH2SFTP.SFTPPacket extends SSH2DataBuffer implements NIOCallback
BOOLEAN_FALSE, BOOLEAN_TRUE, data, rPos, wPos| Constructor and Description |
|---|
SSH2SFTP.SFTPPacket() |
| Modifier and Type | Method and Description |
|---|---|
void |
asyncRead(NonBlockingInput in,
SSH2SFTP.Callback callback) |
void |
completed(java.nio.ByteBuffer buf)
Called once the network read operation has been completed
|
void |
connected(boolean timeout)
Called once the connection has been established (assuming
interest for this has been registered by calling the
NotifyWhenConnected method of Switchboard). |
void |
connectionFailed(java.lang.Exception e)
Called if the connection failed (assuming
interest for this has been registered by calling the
NotifyWhenConnected method of Switchboard). |
void |
failsafeReadFrom(NonBlockingInput in,
int timeout)
Failsafe read method.
|
int |
getId() |
int |
getLength() |
int |
getType() |
SSH2SFTP.FileAttributes |
readAttrs() |
void |
readFailed(java.lang.Exception e)
Called if the read failed
|
void |
readFrom(NonBlockingInput in,
int timeout) |
SSH2SFTP.FileSystemAttributes |
readFSAttrs() |
void |
reset(int type,
int id) |
void |
writeAttrs(SSH2SFTP.FileAttributes attrs) |
void |
writeFailed()
Called if the write failed
|
void |
writeTo(NonBlockingOutput out) |
getData, getMaxReadSize, getMaxSize, getMaxWriteSize, getRPos, getWPos, readBigInt, readBigIntBits, readBoolean, readByte, readInt, readJavaString, readLong, readRaw, readRaw, readRestRaw, readString, readString, readUInt, reset, resize, setData, setRPos, setWPos, writeBigInt, writeBigIntBits, writeBoolean, writeByte, writeInt, writeInt, writeLong, writeRaw, writeRaw, writeString, writeString, writeString, writeUTF8Stringpublic void reset(int type,
int id)
public int getType()
public int getId()
public int getLength()
public void writeAttrs(SSH2SFTP.FileAttributes attrs)
public SSH2SFTP.FileAttributes readAttrs()
public SSH2SFTP.FileSystemAttributes readFSAttrs()
public void failsafeReadFrom(NonBlockingInput in, int timeout) throws SSH2SFTP.SFTPException
This is useful when reading the first version packet which is small but may be, on broken systems, preceded by some ascii characters.
in - Stream to read data fromtimeout - TimeoutSSH2SFTP.SFTPExceptionpublic void readFrom(NonBlockingInput in, int timeout) throws SSH2SFTP.SFTPException
SSH2SFTP.SFTPExceptionpublic void asyncRead(NonBlockingInput in, SSH2SFTP.Callback callback) throws SSH2SFTP.SFTPException
SSH2SFTP.SFTPExceptionpublic void writeTo(NonBlockingOutput out) throws SSH2SFTP.SFTPException
SSH2SFTP.SFTPExceptionpublic void completed(java.nio.ByteBuffer buf)
NIOCallbackcompleted in interface NIOCallbackbuf - the buffer provided to the read callpublic void readFailed(java.lang.Exception e)
NIOCallbackreadFailed in interface NIOCallbackpublic void writeFailed()
NIOCallbackwriteFailed in interface NIOCallbackpublic void connected(boolean timeout)
NIOCallbackNotifyWhenConnected method of Switchboard).connected in interface NIOCallbacktimeout - true if the connection attempt timed outpublic void connectionFailed(java.lang.Exception e)
NIOCallbackNotifyWhenConnected method of Switchboard).connectionFailed in interface NIOCallbacke - the exception the connection failed with.