|
Secure iNet Factory | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.jscape.inet.sftp.PacketReader
public final class PacketReader
The SFTP packet reader. Restores SFTP packets from the input stream.
| Constructor Summary | |
|---|---|
PacketReader(java.io.InputStream in)
Creates a new packet reader instance. |
|
PacketReader(java.io.InputStream in,
java.util.Map packets)
Creates a new packet reader instance. |
|
| Method Summary | |
|---|---|
void |
close()
Closes the current reader and releases all associated resources. |
boolean |
isClosed()
Checks if the current reader is closed. |
boolean |
knowsPacket(int type)
Checks if reader can read packets of the specified type. |
SftpPacket |
readPacket(java.lang.String charset)
Reads the packet from the stream. |
void |
registerPacket(int type,
java.lang.Class packetClass)
Adds packet class to the reader. |
void |
unregisterPacket(int type)
Removes packet from the reader. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PacketReader(java.io.InputStream in)
in - the base input stream
public PacketReader(java.io.InputStream in,
java.util.Map packets)
in - the base input streampackets - packets to read| Method Detail |
|---|
public void registerPacket(int type,
java.lang.Class packetClass)
type - a packet typepacketClass - a packet classpublic void unregisterPacket(int type)
type - a packet type to removepublic boolean knowsPacket(int type)
type - a packet type
true if the current reader can read these packets;
otherwisepublic void close()
public boolean isClosed()
true if the reader is closed;
false otherwise
public SftpPacket readPacket(java.lang.String charset)
throws SftpException
SftpException - if I/O error occurs
|
Secure iNet Factory | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||