InMemoryRandomAccessStream 类    
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
提供对存储在内存而不是磁盘上的输入和输出流中的数据的随机访问。
public ref class InMemoryRandomAccessStream sealed : IClosable, IRandomAccessStream
	/// [Windows.Foundation.Metadata.Activatable(65536, Windows.Foundation.UniversalApiContract)]
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class InMemoryRandomAccessStream final : IClosable, IRandomAccessStream
	/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Activatable(65536, "Windows.Foundation.UniversalApiContract")]
class InMemoryRandomAccessStream final : IClosable, IRandomAccessStream
	[Windows.Foundation.Metadata.Activatable(65536, typeof(Windows.Foundation.UniversalApiContract))]
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class InMemoryRandomAccessStream : System.IDisposable, IRandomAccessStream
	[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Activatable(65536, "Windows.Foundation.UniversalApiContract")]
public sealed class InMemoryRandomAccessStream : System.IDisposable, IRandomAccessStream
	function InMemoryRandomAccessStream()
	Public NotInheritable Class InMemoryRandomAccessStream
Implements IDisposable, IRandomAccessStream
		- 继承
 
- 属性
 
- 实现
 
Windows 要求
| 设备系列 | 
					 
							Windows 10 (在 10.0.10240.0 中引入) 
				 | 
			
| API contract | 
					 
							Windows.Foundation.UniversalApiContract (在 v1.0 中引入) 
				 | 
			
示例
请参阅 DataReader 主题中的代码示例。
构造函数
| InMemoryRandomAccessStream() | 
		 创建 InMemoryRandomAccessStream 类的新实例。  | 
        	
属性
| CanRead | 
		 获取一个值,该值指示是否可以从中读取流。  | 
        	
| CanWrite | 
		 获取一个值,该值指示是否可以将流写入。  | 
        	
| Position | 
		 获取流的字节偏移量。  | 
        	
| Size | 
		 获取或设置随机访问流的大小。  | 
        	
方法
| CloneStream() | 
		 在当前流所在的资源上创建 IRandomAccessStream 的新实例。  | 
        	
| Close() | 
		 关闭当前流并释放系统资源。  | 
        	
| Dispose() | 
		 执行与释放或重置非托管资源关联的应用程序定义的任务。  | 
        	
| FlushAsync() | 
		 在顺序流中异步刷新数据。  | 
        	
| GetInputStreamAt(UInt64) | 
		 返回流中指定位置的输入流。  | 
        	
| GetOutputStreamAt(UInt64) | 
		 返回流中指定位置的输出流。  | 
        	
| ReadAsync(IBuffer, UInt32, InputStreamOptions) | 
		 返回异步字节读取器对象。  | 
        	
| Seek(UInt64) | 
		 将流的位置设置为指定值。  | 
        	
| WriteAsync(IBuffer) | 
		 在顺序流中异步写入数据。  |