IoUtils
Attributes
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
IoUtils.type
Members list
Value members
Concrete methods
Autodetects whether the input stream is a non-delimited Jelly file or a delimited Jelly file.
Autodetects whether the input stream is a non-delimited Jelly file or a delimited Jelly file.
To do this, the first three bytes in the stream are peeked. These bytes are then put back into the stream, and the stream is returned, so the parser won't notice the peeking.
Value parameters
- in
-
the input stream
Attributes
- Returns
-
(isDelimited, newInputStream) where isDelimited is true if the stream is a delimited Jelly file
Utility method to transform a non-delimited Jelly frame (as a byte array) into a delimited one, writing it to a byte stream.
Utility method to transform a non-delimited Jelly frame (as a byte array) into a delimited one, writing it to a byte stream.
This is useful if you for example store non-delimited frames in a database, but want to write them to a stream.
Value parameters
- nonDelimitedFrame
-
EXACTLY one non-delimited Jelly frame
- output
-
the output stream to write the frame to