IsolatedStorageFileStream Class

July 28, 2014

Exposes a file within isolated storage.

System.Object
  System.IO.Stream
    System.IO.FileStream
      System.IO.IsolatedStorage.IsolatedStorageFileStream

Namespace:  System.IO.IsolatedStorage
Assembly:  mscorlib (in mscorlib.dll)

public class IsolatedStorageFileStream : FileStream

The IsolatedStorageFileStream type exposes the following members.

  NameDescription
Public methodIsolatedStorageFileStream(String, FileMode, IsolatedStorageFile)Initializes a new instance of the IsolatedStorageFileStream class giving access to the file designated by path, in the specified mode, and in the context of the IsolatedStorageFile specified by isf.
Public methodIsolatedStorageFileStream(String, FileMode, FileAccess, IsolatedStorageFile)Initializes a new instance of the IsolatedStorageFileStream class giving access to the file designated by path in the specified mode, with the specified file access, and in the context of the IsolatedStorageFile specified by isf.
Public methodIsolatedStorageFileStream(String, FileMode, FileAccess, FileShare, IsolatedStorageFile)Initializes a new instance of the IsolatedStorageFileStream class giving access to the file designated by path, in the specified mode, with the specified file access, using the file sharing mode specified by share, and in the context of the IsolatedStorageFile specified by isf.
Top

  NameDescription
Public propertyCanReadGets a Boolean value indicating whether the file can be read. (Overrides FileStream.CanRead.)
Public propertyCanSeekGets a Boolean value indicating whether seek operations are supported. (Overrides FileStream.CanSeek.)
Public propertyCanTimeoutGets a value that determines whether the current stream can time out. (Inherited from Stream.)
Public propertyCanWriteGets a Boolean value indicating whether you can write to the file. (Overrides FileStream.CanWrite.)
Public propertyLengthGets the length of the IsolatedStorageFileStream object. (Overrides FileStream.Length.)
Public propertyNameGets the name of the file that was used to create the instance of the IsolatedStorageFileStream.
Public propertyPositionGets or sets the current position of the current IsolatedStorageFileStream object. (Overrides FileStream.Position.)
Public propertyReadTimeoutGets or sets a value, in miliseconds, that determines how long the stream will attempt to read before timing out. (Inherited from Stream.)
Public propertyWriteTimeoutGets or sets a value, in miliseconds, that determines how long the stream will attempt to write before timing out. (Inherited from Stream.)
Top

  NameDescription
Public methodBeginReadBegins an asynchronous read. (Overrides FileStream.BeginRead(Byte[], Int32, Int32, AsyncCallback, Object).)
Public methodBeginWriteBegins an asynchronous write. (Overrides FileStream.BeginWrite(Byte[], Int32, Int32, AsyncCallback, Object).)
Public methodCloseCloses the current stream and releases any resources (such as sockets and file handles) associated with the current stream. (Inherited from Stream.)
Public methodCopyTo(Stream)Reads all the bytes from the current stream and writes them to the destination stream. (Inherited from Stream.)
Public methodCopyTo(Stream, Int32)Reads all the bytes from the current stream and writes them to a destination stream, using a specified buffer size. (Inherited from Stream.)
Public methodCopyToAsync(Stream)Asynchronously reads the bytes from the current stream and writes them to another stream. (Inherited from Stream.)
Public methodCopyToAsync(Stream, Int32)Asynchronously reads the bytes from the current stream and writes them to another stream, using a specified buffer size. (Inherited from Stream.)
Public methodCopyToAsync(Stream, Int32, CancellationToken)Asynchronously reads the bytes from the current stream and writes them to another stream, using a specified buffer size and cancellation token. (Inherited from Stream.)
Public methodDispose()Releases all resources used by the Stream. (Inherited from Stream.)
Protected methodDispose(Boolean)Releases the unmanaged resources used by the IsolatedStorageFileStream and optionally releases the managed resources. (Overrides FileStream.Dispose(Boolean).)
Public methodEndReadEnds a pending asynchronous read request. (Overrides FileStream.EndRead(IAsyncResult).)
Public methodEndWriteEnds an asynchronous write. (Overrides FileStream.EndWrite(IAsyncResult).)
Public methodEquals(Object)Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected methodFinalizeEnsures that resources are freed and other cleanup operations are performed when the garbage collector reclaims the FileStream. (Inherited from FileStream.)
Public methodFlush()Updates the file with the current state of the buffer then clears the buffer. (Overrides FileStream.Flush().)
Public methodFlush(Boolean)Clears buffers for this stream and causes any buffered data to be written to the file, and also clears all intermediate file buffers. (Overrides FileStream.Flush(Boolean).)
Public methodFlushAsync()Asynchronously clears all buffers for this stream and causes any buffered data to be written to the underlying device. (Inherited from Stream.)
Public methodFlushAsync(CancellationToken)Asynchronously clears all buffers for this stream, causes any buffered data to be written to the underlying device, and monitors cancellation requests. (Inherited from Stream.)
Public methodGetHashCodeServes as a hash function for a particular type. (Inherited from Object.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodReadCopies bytes from the current buffered IsolatedStorageFileStream object to an array. (Overrides FileStream.Read(Byte[], Int32, Int32).)
Public methodReadAsync(Byte[], Int32, Int32)Asynchronously reads a sequence of bytes from the current stream and advances the position within the stream by the number of bytes read. (Inherited from Stream.)
Public methodReadAsync(Byte[], Int32, Int32, CancellationToken)Asynchronously reads a sequence of bytes from the current stream, advances the position within the stream by the number of bytes read, and monitors cancellation requests. (Inherited from Stream.)
Public methodReadByteReads a single byte from the IsolatedStorageFileStream object in isolated storage. (Overrides FileStream.ReadByte().)
Public methodSeekSets the current position of this IsolatedStorageFileStream object to the specified value. (Overrides FileStream.Seek(Int64, SeekOrigin).)
Public methodSetLengthSets the length of this IsolatedStorageFileStream object to the specified value. (Overrides FileStream.SetLength(Int64).)
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Public methodWriteWrites a block of bytes to the IsolatedStorageFileStream object using data read from a byte array. (Overrides FileStream.Write(Byte[], Int32, Int32).)
Public methodWriteAsync(Byte[], Int32, Int32)Asynchronously writes a sequence of bytes to the current stream and advances the current position within this stream by the number of bytes written. (Inherited from Stream.)
Public methodWriteAsync(Byte[], Int32, Int32, CancellationToken)Asynchronously writes a sequence of bytes to the current stream, advances the current position within this stream by the number of bytes written, and monitors cancellation requests. (Inherited from Stream.)
Public methodWriteByteWrites a single byte to the IsolatedStorageFileStream object. (Overrides FileStream.WriteByte(Byte).)
Top

Use this class to read, write and create files in isolated storage.

Since this class extends FileStream, you can use an instance of IsolatedStorageFileStream in most situations where a FileStream might otherwise be used, such as to construct a StreamReader or StreamWriter.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Show:
© 2014 Microsoft