|
||||||||||
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(java.io.InputStream in)
Read the contents from the input stream into the current class's format. |
void |
readMessage(java.io.InputStream in,
int size,
int type)
Read the contents from the input stream into the current class's format. |
void |
writeMessage(java.io.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(java.io.InputStream in, int size, int type) throws I2CPMessageException, java.io.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.
java.io.IOException
- if there is a problem reading from the streamvoid readMessage(java.io.InputStream in) throws I2CPMessageException, java.io.IOException
in
- stream to read from
I2CPMessageException
- if the stream doesn't contain a valid message
that this class can read.
java.io.IOException
- if there is a problem reading from the streamvoid writeMessage(java.io.OutputStream out) throws I2CPMessageException, java.io.IOException
I2CPMessageException
- if the current object doesn't have sufficient data
to write a properly formatted message.
java.io.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 |