Check out example codes for "c# write byte[] to stream". It will help you in understanding the concepts better.

Code Example 1

static void Write(Stream s, Byte[] bytes)
{
    using (var writer = new BinaryWriter(s))
    {
        writer.Write(bytes);
    }
}

Learn ReactJs, React Native from akashmittal.com