|
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.SftpPacket
public abstract class SftpPacket
Represents SFTP packet. The base class for all SFTP packets.
Method Summary | |
---|---|
long |
getId()
Returns the current packet number in session. |
int |
getType()
Returns packet type code. |
static SftpPacket |
readFrom(java.io.InputStream in,
java.lang.Class packetClass,
java.lang.String charset)
Reads the packet from the stream. |
static SftpPacket |
readFrom(SshReader reader,
java.lang.Class packetClass)
Reads the packet from the stream. |
void |
setId(long id)
Setups the current packet number in SFTP session. |
void |
writeTo(java.io.OutputStream out,
java.lang.String charset)
Writes the current packet to the specified stream. |
void |
writeTo(SshWriter writer)
Writes the current packet to the specified writer. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static SftpPacket readFrom(java.io.InputStream in, java.lang.Class packetClass, java.lang.String charset) throws SftpException
in
- the input streampacketClass
- the packet class
SftpException
- if an I/O error occurspublic static SftpPacket readFrom(SshReader reader, java.lang.Class packetClass) throws SftpException
reader
- the SSH types readerpacketClass
- the packet class
SftpException
- if an I/O error occurspublic int getType()
public void setId(long id)
id
- the current packet numberpublic long getId()
null
if
number is not set.public void writeTo(java.io.OutputStream out, java.lang.String charset) throws java.io.IOException
out
- the output stream
java.io.IOException
- if I/O error occuredpublic void writeTo(SshWriter writer) throws java.io.IOException
writer
- the SSH types writer
java.io.IOException
- if I/O error occurs
|
Secure iNet Factory | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |