I am looking for an implementation of a memory stream in Java. The implementation should be roughly modeled after the implementation of the .NET memory stream .
Basically, I would like to have a MemoryStream class that has factory methods:
class MemoryStream { MemoryInput createInput(); MemoryOutput createOutput(); } class MemoryInput extends InputStream { long position(); void seek(long pos); } class MemoryOutput extends OutputStream { long position(); void seek(long pos); }
Therefore, when I have an instance from the MemoryStream class, I can simultaneously create input and output streams, which should also allow positioning in any direction. The memory stream does not have to be circular, it should work well with small sizes and automatically increase. Memory flow should be limited to only one process.
Any of the box codes available?
java stream memory seek
j4n bur53 Dec 08 '11 at 19:43 2011-12-08 19:43
source share