public interface Message
Modifier and Type | Method and Description |
---|---|
void |
read(InputStream in)
Reads itself from the provided
InputStream |
void |
write(OutputStream out)
Writes itself to the provided
OutputStream . |
void read(InputStream in) throws ClientRuntimeException, ProviderException
InputStream
in
- the steam to read from.ClientRuntimeException
- to indicate a system error, potentially network related
and hopefully recoverable. Typically used to wrap and propagate the IO stream's thrown
IOException
s.ProviderException
- to indicate operational error not directly related to the stream,
and should be treated as a bug.void write(OutputStream out) throws ClientRuntimeException, ProviderException
OutputStream
.out
- the stream to write to.ClientRuntimeException
- to indicate a system error, potentially network related
and hopefully recoverable. Typically used to wrap and propagate the IO stream's thrown
IOException
s.ProviderException
- to indicate operational error not directly related to the stream,
and should be treated as a bug.Copyright © 2009–2017. All rights reserved.