java.lang.Object
nl.andrewl.concord_core.util.ChainedDataOutputStream
A more complex output stream which redefines certain methods for convenience
with method chaining.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T extends Message>
ChainedDataOutputStreamwriteArray
(T[] array) writeInt
(int x) <T extends Message>
ChainedDataOutputStreamwriteMessage
(Message msg) writeObject
(Object o, Class<?> type) Writes an object to the stream.writeStrings
(String... strings)
-
Field Details
-
out
-
-
Constructor Details
-
ChainedDataOutputStream
-
-
Method Details
-
writeInt
- Throws:
IOException
-
writeString
- Throws:
IOException
-
writeStrings
- Throws:
IOException
-
writeEnum
- Throws:
IOException
-
writeUUID
- Throws:
IOException
-
writeArray
- Throws:
IOException
-
writeMessage
- Throws:
IOException
-
writeObject
Writes an object to the stream.- Parameters:
o
- The object to write.type
- The object's type. This is needed in case the object itself is null, which may be the case for some strings or ids.- Returns:
- The chained output stream.
- Throws:
IOException
- If an error occurs.
-