Arne Vajh=F8j schrieb:
Use java.nio.ByteBuffer and handle concurrency in your code.
ByteBuffer does not extend automatically. If I do
put and reach the size of the byte buffer, I will
get an exception BufferOverflowException.
That is at least how I interpret the javadoc.
I am not looking for a bounded memory stream, it
should be unbounded, like (temporary) files are.
You just write and write and write, thats it.
Size control of the memory stream can be done
via close truncate for example.
The reference to the memory stream should be
still valid when an input stream or output stream
sitting on it does a close. With the same memory
stream reference I should be able to create new
input or output streams over it, that will work
on the previously written content.
unbounded buffers.