fromStream

Writes contents of the stream to the store. Implementations should expect that the stream contains data in an
implementation-specific format, typically generated using toStream(java.io.ObjectOutput). While not a
requirement, it is recommended that implementations make use of the StreamingMarshaller
when dealing with the stream to make use of efficient marshalling.

It is imperative that implementations do not close the stream after finishing with it.

It is also recommended that implementations use their own start and end markers on the stream since
other processes may write additional data to the stream after the cache store has written to it. As such, either
markers or some other mechanism to prevent the store from reading too much information should be employed when
writing to the stream in fromStream(java.io.ObjectInput) to prevent data corruption.

It can be assumed that the stream passed in already performs buffering such that the cache store implementation
doesn't have to.

toStream

Loads the entire state into a stream, using whichever format is most efficient for the cache loader
implementation. Typically read and parsed by fromStream(java.io.ObjectInput).

While not a requirement, it is recommended that implementations make use of the StreamingMarshaller when dealing with the stream to make use of efficient marshalling.

It is imperative that implementations do not flush or close the stream after finishing with it.

It is also recommended that implementations use their own start and end markers on the stream since
other processes may write additional data to the stream after the cache store has written to it. As such, either
markers or some other mechanism to prevent the store from reading too much information in fromStream(java.io.ObjectInput) should be employed, to prevent data corruption.

It can be assumed that the stream passed in already performs buffering such that the cache store implementation
doesn't have to.