public XdrBuffer(XdrBuffer prevChunk = null) { buffer = XdrBufferFactory.Rent(DefaultBufferSize); Data = buffer.Buffer; if (prevChunk != null) { PrevChunk = prevChunk; prevChunkTotalLength = prevChunk.TotalLength; } }
public XdrStreamWriter(Stream stream) { if (stream == null) { throw new ArgumentNullException(nameof(stream)); } if (!stream.CanWrite) { throw new ArgumentException("Stream is not writable"); } this.stream = stream; sharedBuffer = XdrBufferFactory.Rent(DefaultBufferSize); }
public XdrStreamReader(Stream stream) { this.stream = stream; buffer = XdrBufferFactory.Rent(); }