/// <summary>Copy the current contents of this buffer to the named output. </summary> public virtual void WriteTo(OutputStream out_Renamed) { Flush(); long end = file.length; long pos = 0; int buffer = 0; while (pos < end) { int length = BUFFER_SIZE; long nextPos = pos + length; if (nextPos > end) { // at the last buffer length = (int) (end - pos); } out_Renamed.WriteBytes((byte[]) file.buffers[buffer++], length); pos = nextPos; } }