Metro各種ストリーム変換
1435 ワード
Ibuffer byte[]
byte[] bytes=WindowsRuntimeBufferExtensions.ToArray(buffer,0,(int)buffer.Length);
Byte[] Ibuffer
WindowsRuntimeBufferExtensions.AsBuffer(bytes,0,bytes.Length);
IrandomAccessStream Stream回転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;
参照先:
http://www.cnblogs.com/jing870812/archive/2012/04/12/2444870.html