Method Read
- Namespace
- DisCatSharp.Common.Types
- Assembly
- DisCatSharp.Common.dll
Read(Span<T>, ulong, out int)
Reads data from this buffer to the specified destination buffer. This method will write either as many bytes as there are in the destination buffer, or however many bytes are available in this buffer, whichever is less.
bool Read(Span<T> destination, ulong source, out int itemsWritten)
Parameters
destinationSpan<T>Buffer to read the data from this buffer into.
sourceulongStarting position in this buffer to read from.
itemsWrittenintNumber of items written to the destination buffer.
Returns
- bool
Whether more data is available in this buffer.
Read(T[], int, int, ulong, out int)
Reads data from this buffer to specified destination array. This method will write either as many bytes as specified for the destination array, or however many bytes are available in this buffer, whichever is less.
bool Read(T[] data, int start, int count, ulong source, out int itemsWritten)
Parameters
dataT[]Array to read the data from this buffer into.
startintStarting position in the target array to write to.
countintMaximum number of bytes to write to target array.
sourceulongStarting position in this buffer to read from.
itemsWrittenintNumber of items written to the destination buffer.
Returns
- bool
Whether more data is available in this buffer.
Read(ArraySegment<T>, ulong, out int)
Reads data from this buffer to specified destination array slice. This method will write either as many bytes as specified in the target slice, or however many bytes are available in this buffer, whichever is less.
bool Read(ArraySegment<T> data, ulong source, out int itemsWritten)
Parameters
dataArraySegment<T>sourceulongitemsWrittenintNumber of items written to the destination buffer.
Returns
- bool
Whether more data is available in this buffer.