|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.mindbright.ssh2.SSH2DataBuffer
com.mindbright.ssh2.SSH2SFTP.SFTPPacket
protected static final class SSH2SFTP.SFTPPacket
Handles sftp data packets. Contains functions to read and write the sftp types.
| Field Summary |
|---|
| Fields inherited from class com.mindbright.ssh2.SSH2DataBuffer |
|---|
BOOLEAN_FALSE, BOOLEAN_TRUE, data, rPos, wPos |
| Constructor Summary | |
|---|---|
SSH2SFTP.SFTPPacket()
|
|
| Method Summary | |
|---|---|
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)
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)
|
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)
|
| Methods inherited from class com.mindbright.ssh2.SSH2DataBuffer |
|---|
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, writeUTF8String |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SSH2SFTP.SFTPPacket()
| Method Detail |
|---|
public 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)
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 from
SSH2SFTP.SFTPException
public void readFrom(NonBlockingInput in)
throws SSH2SFTP.SFTPException
SSH2SFTP.SFTPException
public void asyncRead(NonBlockingInput in,
SSH2SFTP.Callback callback)
throws SSH2SFTP.SFTPException
SSH2SFTP.SFTPException
public void writeTo(NonBlockingOutput out)
throws SSH2SFTP.SFTPException
SSH2SFTP.SFTPExceptionpublic void completed(java.nio.ByteBuffer buf)
NIOCallback
completed in interface NIOCallbackbuf - the buffer provided to the read callpublic void readFailed(java.lang.Exception e)
NIOCallback
readFailed in interface NIOCallbackpublic void writeFailed()
NIOCallback
writeFailed 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.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||