Ibuffer转byte[] byte[] bytes=WindowsRuntimeBufferExtensions.ToArray(buffer,0,(int)buffer.Length); Byte[]转Ibuffer WindowsRuntimeBufferExtensions.AsBuffer(bytes,0,bytes.Length);
IRandomAccessStream转 Stream
Stream stream=WindowsRuntimeStreamExtensions.AsStreamForRead(randomStream.GetInputStreamAt(0));
Ibuffer转Stream
Stream stream = WindowsRuntimeBufferExtensions.AsStream(buffer);
Byte转Stream
Stream stream =
new
MemoryStream(bytes);
IRandomAccessStream转FileInputStream
FileInputStream inputStream=randomStream.GetInputStreamAt(0)
as
FileInputStream;
IRandomAccessStream转FileOutputStream
FileOutputStream outStream= randomStream.GetOutputStreamAt(0)
as
FileOutputStream;