IIOStream <T> CloneStream <T>(IInStream <T> stream) { var mem = new MemoryIOStream <T>(); mem.AssignFrom(stream); return(mem); }
private void CopyOnWrite() { if (FCurrentInStream == FInStream) { // Copy data FIOStream.AssignFrom(FInStream); // Set current inStream to ioStream FCurrentInStream = FIOStream; } }