public interface IStreamedPacket extends IPacket
Modifier and Type | Method and Description |
---|---|
int |
getSize()
Gets the size of the output data.
|
void |
readData(java.io.OutputStream outputStream)
Reads payload data to an
OutputStream . |
void |
writeData(java.io.InputStream inputStream,
int size)
Writes payload data from an
InputStream . |
getProtocol, isValid, loadPayload, savePayload
void readData(java.io.OutputStream outputStream) throws java.io.IOException, PacketException
OutputStream
.outputStream
- The output stream to read data to.java.lang.NullPointerException
- outputStream is null.java.io.IOException
- An IO Exception has occurred.PacketException
- An Exception has occurred.void writeData(java.io.InputStream inputStream, int size) throws java.io.IOException, PacketException
InputStream
.inputStream
- The input stream to write data from.size
- The size of the input payload in bytes.java.lang.NullPointerException
- inputStream is null.java.lang.IllegalArgumentException
- size is less than 0.java.io.IOException
- An IO Exception has occurred.PacketException
- An Exception has occurred.int getSize() throws PacketException
PacketException
- An Exception has occurred.