Memory Stream in Java
问题 I am looking for a memory stream implementation in Java. The implementation should be roughly modeled after the .NET memory stream implementation. Basically I would like to have a class MemoryStream which has to 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); } So once I have an instance