|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface I2CPMessage
Defines the base functionality of API messages
| Method Summary | |
|---|---|
int |
getType()
Return the unique identifier for this type of APIMessage, as specified in the network specification document under #ClientAccessLayerMessages |
void |
readMessage(InputStream in)
Read the contents from the input stream into the current class's format. |
void |
readMessage(InputStream in,
int size,
int type)
Read the contents from the input stream into the current class's format. |
void |
writeMessage(OutputStream out)
Write the current message to the output stream as a full message following the specification from the I2CP definition. |
| Methods inherited from interface net.i2p.data.DataStructure |
|---|
calculateHash, fromBase64, fromByteArray, readBytes, toBase64, toByteArray, writeBytes |
| Method Detail |
|---|
void readMessage(InputStream in,
int size,
int type)
throws I2CPMessageException,
IOException
in - stream to read fromsize - number of bytes in the message payloadtype - type of message (should equal getType())
I2CPMessageException - if the stream doesn't contain a valid message
that this class can read.
IOException - if there is a problem reading from the stream
void readMessage(InputStream in)
throws I2CPMessageException,
IOException
in - stream to read from
I2CPMessageException - if the stream doesn't contain a valid message
that this class can read.
IOException - if there is a problem reading from the stream
void writeMessage(OutputStream out)
throws I2CPMessageException,
IOException
out - OutputStream
I2CPMessageException - if the current object doesn't have sufficient data
to write a properly formatted message.
IOException - if there is a problem writing to the streamint getType()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||