酢ろぐ!

カレーが嫌いなスマートフォンアプリプログラマのブログ。

2013-12-06から1日間の記事一覧

WindowsストアアプリでWindows.Storage.Streams.IBuffer型のバッファからSystem.IO.Stream型のストリームへ変換する

Windows.Storage.Streams.IBufferからSystem.IO.Streamの変換です。 // using System.Runtime.InteropServices.WindowsRuntime; // using Windows.Storage.Streams; System.IO.Stream stream = GetStream(); // ストリームからデータを読み込む var bytes = …

WindowsストアアプリでWindows.Storage.Streams.IBuffer型のバッファとbyte型配列とを相互に変換する

byte[] → IBuffer byte型配列からWindows.Storage.Streams.IBufferの変換です。 usingディレクティブにSystem.Runtime.InteropServices.WindowsRuntimeを宣言しておくことによって拡張メソッドが使用できるようになります。 byte型配列の拡張メソッドのAsBuf…

WindowsストアアプリでWindows.Storage.Streams.IRandomAccessStream型のストリームとbyte型配列とを相互に変換する

byte型の配列からIRandomAccessStream型のストリームへ変換する byte型配列からWindows.Storage.Streams.IRandomAccessStream型のストリームへの変換です。 Windowsストアアプリでは、System.IO.WindowsRuntimeStreamExtensionsクラスが提供されています。こ…

WindowsストアアプリでWindows.Storage.Streams.IRandomAccessStream型のストリームとSystem.IO.Stream型のストリームとを相互に変換する

まとめはこっちに書いています。 本記事ではWindowsストアアプリでのSystem.IO.Stream型からWindows.Storage.Streams.IRandomAccessStream型への変換。または逆のWindows.Storage.Streams.IRandomAccessStream型からSystem.IO.Stream型へ変換する方法を紹介…