FileInputStream FileInputStream FileInputStream FileInputStream FileInputStream Class

Definition

Reads data from a file.

public : sealed class FileInputStream : IClosable, IInputStream
struct winrt::Windows::Storage::Streams::FileInputStream : IClosable, IInputStream
public sealed class FileInputStream : IDisposable, IInputStream
Public NotInheritable Class FileInputStream Implements IDisposable, IInputStream
// This class does not provide a public constructor.
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Methods

Close() Close() Close() Close() Close()

Closes the current stream and releases system resources.

public : void Close()
void Close() const;
// This member is not implemented in C#
' This member is not implemented in VB.Net
// This member is not implemented in JavaScript
See Also

Dispose() Dispose() Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

// This member is not implemented in C++/CX
void Dispose()
Sub Dispose

ReadAsync(IBuffer, UInt32, InputStreamOptions) ReadAsync(IBuffer, UInt32, InputStreamOptions) ReadAsync(IBuffer, UInt32, InputStreamOptions) ReadAsync(IBuffer, UInt32, InputStreamOptions) ReadAsync(IBuffer, UInt32, InputStreamOptions)

Returns an asynchronous byte reader object.

public : IAsyncOperationWithProgress<IBuffer, unsigned int> ReadAsync(IBuffer buffer, unsigned int count, InputStreamOptions options)
IAsyncOperationWithProgress<IBuffer, uint32_t> ReadAsync(IBuffer buffer, uint32_t count, InputStreamOptions options) const;
public IAsyncOperationWithProgress<IBuffer, uint> ReadAsync(IBuffer buffer, UInt32 count, InputStreamOptions options)
Public Function ReadAsync(buffer As IBuffer, count As UInt32, options As InputStreamOptions) As IAsyncOperationWithProgress( Of IBuffer )( Of uint )
Windows.Storage.Streams.FileInputStream.readAsync(buffer, count, options).done( /* Your success and error handlers */ );
Parameters
buffer
IBuffer IBuffer IBuffer

The buffer into which the asynchronous read operation places the bytes that are read.

count
UInt32 UInt32 UInt32

The number of bytes to read that is less than or equal to the Capacity value.

options
InputStreamOptions InputStreamOptions InputStreamOptions

Specifies the type of the asynchronous read operation.

Returns