public class IsolatedStorageFileStream extends FileStream
Constructor and Description |
---|
IsolatedStorageFileStream(java.lang.String path,
FileMode mode,
java.util.EnumSet<FileAccess> access,
java.util.EnumSet<FileShare> share,
IsolatedStorageFile isf) |
IsolatedStorageFileStream(java.lang.String path,
FileMode mode,
java.util.EnumSet<FileAccess> access,
IsolatedStorageFile isf) |
IsolatedStorageFileStream(java.lang.String path,
FileMode mode,
IsolatedStorageFile isf)
Initializes a new instance of the System.IO.IsolatedStorage.IsolatedStorageFileStream class giving access to the file designated by path, in the specified mode, and in the context of the System.IO.IsolatedStorage.IsolatedStorageFile specified by isf.
|
Modifier and Type | Method and Description |
---|---|
IAsyncResult |
BeginRead(byte[] buffer,
int offset,
int numBytes,
AsyncCallback userCallback,
java.lang.Object stateObject)
Begins an asynchronous read.
|
IAsyncResult |
BeginWrite(byte[] buffer,
int offset,
int numBytes,
AsyncCallback userCallback,
java.lang.Object stateObject)
Begins an asynchronous write.
|
int |
EndRead(IAsyncResult asyncResult)
Ends a pending asynchronous read request.
|
void |
EndWrite(IAsyncResult asyncResult)
Ends an asynchronous write.
|
void |
Flush()
Updates the file with the current state of the buffer then clears the buffer.
|
int |
Read(byte[] buffer,
int offset,
int count)
Copies bytes from the current buffered IsolatedStorageFileStream object to an array.
|
int |
ReadByte()
Reads a single byte from the IsolatedStorageFileStream object in isolated storage.
|
long |
Seek(long offset,
SeekOrigin origin)
When overridden in a derived class, sets the position within the current stream.
|
void |
SetLength(long value)
Sets the length of this IsolatedStorageFileStream object to the specified value.
|
void |
Write(byte[] buffer,
int offset,
int count)
Writes a block of bytes to the IsolatedStorageFileStream object using data read from a byte array.
|
void |
WriteByte(byte value)
Writes a single byte to the IsolatedStorageFileStream object.
|
CanRead, CanSeek, CanWrite, finalize, getName, getPosition, Length, setPosition
CanTimeout, Close, Dispose, Dispose
public IsolatedStorageFileStream(java.lang.String path, FileMode mode, java.util.EnumSet<FileAccess> access, java.util.EnumSet<FileShare> share, IsolatedStorageFile isf)
path
- mode
- access
- share
- isf
- public IsolatedStorageFileStream(java.lang.String path, FileMode mode, java.util.EnumSet<FileAccess> access, IsolatedStorageFile isf)
path
- mode
- access
- isf
- public IsolatedStorageFileStream(java.lang.String path, FileMode mode, IsolatedStorageFile isf)
path
- The relative path of the file within isolated storage.mode
- One of the System.IO.FileMode values.isf
- The System.IO.IsolatedStorage.IsolatedStorageFile in which to open the System.IO.IsolatedStorage.IsolatedStorageFileStream.IsolatedStorageException
- isf has been disposed. -or-path is badly formed.-or-path is null. -or-isf is null.-orThe directory in path does not exist.-or-No file was found and the mode is set to System.IO.FileMode.Open.public IAsyncResult BeginRead(byte[] buffer, int offset, int numBytes, AsyncCallback userCallback, java.lang.Object stateObject)
BeginRead
in class Stream
buffer
- The buffer to read data into.offset
- The byte offset in buffer at which to begin reading.numBytes
- The maximum number of bytes to read.userCallback
- The method to call when the asynchronous read operation is completed. This parameter is optional.stateObject
- The status of the asynchronous read.IOException
- An asynchronous read was attempted past the end of the file.public IAsyncResult BeginWrite(byte[] buffer, int offset, int numBytes, AsyncCallback userCallback, java.lang.Object stateObject)
BeginWrite
in class Stream
buffer
- The buffer to write data to.offset
- The byte offset in buffer at which to begin writing.numBytes
- The maximum number of bytes to write.userCallback
- The method to call when the asynchronous write operation is completed. This parameter is optional.stateObject
- The status of the asynchronous write.IOException
- An asynchronous read was attempted past the end of the file.public int EndRead(IAsyncResult asyncResult)
EndRead
in class Stream
asyncResult
- The pending asynchronous request.ArgumentNullException
- The asyncResult is null.public void EndWrite(IAsyncResult asyncResult)
EndWrite
in class Stream
asyncResult
- The pending asynchronous I/O request to end.ArgumentNullException
- The asyncResult parameter is null.public void Flush()
Flush
in class FileStream
public int Read(byte[] buffer, int offset, int count)
Read
in class FileStream
buffer
- The buffer to read.offset
- The offset in the buffer at which to begin writing.count
- The maximum number of bytes to read.public int ReadByte()
public long Seek(long offset, SeekOrigin origin)
Stream
Seek
in class FileStream
offset
- origin
- public void SetLength(long value)
SetLength
in class FileStream
value
- The new length of the IsolatedStorageFileStream object.public void Write(byte[] buffer, int offset, int count)
Write
in class FileStream
buffer
- The buffer to write.offset
- The byte offset in buffer from which to begin.count
- The maximum number of bytes to write.ArgumentNullException
- buffer is null.IsolatedStorageException
- The write attempt exceeds the quota for the IsolatedStorageFileStream object.public void WriteByte(byte value)
WriteByte
in class Stream
value
- The byte value to write to the isolated storage file.IsolatedStorageException
- The write attempt exceeds the quota for the IsolatedStorageFileStream object.