C# 클래스 NGettext.Loaders.ReadOnlyStreamWrapper

Stream wrapper that prevents closing and writing to underlying stream.
상속: Stream
파일 보기 프로젝트 열기: neris/NGettext

공개 메소드들

메소드 설명
BeginRead ( byte buffer, int offset, int count, AsyncCallback callback, object state ) : IAsyncResult

Begins an asynchronous read operation.

BeginWrite ( byte buffer, int offset, int count, AsyncCallback callback, object state ) : IAsyncResult

Begins an asynchronous write operation.

Close ( ) : void

Closes the current stream and releases any resources (such as sockets and file handles) associated with the current stream.

EndRead ( IAsyncResult asyncResult ) : int

Waits for the pending asynchronous read to complete.

EndWrite ( IAsyncResult asyncResult ) : void

Ends an asynchronous write operation.

Flush ( ) : void

When overridden in a derived class, clears all buffers for this stream and causes any buffered data to be written to the underlying device.

Read ( byte buffer, int offset, int count ) : int

When overridden in a derived class, reads a sequence of bytes from the current stream and advances the position within the stream by the number of bytes read.

ReadByte ( ) : int

Reads a byte from the stream and advances the position within the stream by one byte, or returns -1 if at the end of the stream.

ReadOnlyStreamWrapper ( Stream baseStream ) : System

Initializes a new instance of the ReadOnlyStreamWrapper class that wraps specified underlying stream.

Seek ( long offset, SeekOrigin origin ) : long

When overridden in a derived class, sets the position within the current stream.

SetLength ( long value ) : void

When overridden in a derived class, sets the length of the current stream.

Write ( byte buffer, int offset, int count ) : void

When overridden in a derived class, writes a sequence of bytes to the current stream and advances the current position within this stream by the number of bytes written.

WriteByte ( byte value ) : void

Writes a byte to the current position in the stream and advances the position within the stream by one byte.

보호된 메소드들

메소드 설명
Dispose ( bool disposing ) : void

Releases the unmanaged resources used by the System.IO.Stream and optionally releases the managed resources.

비공개 메소드들

메소드 설명
_CheckIsClosed ( ) : void

메소드 상세

BeginRead() 공개 메소드

Begins an asynchronous read operation.
Attempted an asynchronous read past the end of the stream, or a disk error occurs. One or more of the arguments is invalid. Methods were called after the stream was closed. The current Stream implementation does not support the read operation.
public BeginRead ( byte buffer, int offset, int count, AsyncCallback callback, object state ) : IAsyncResult
buffer byte The buffer to read the data into.
offset int The byte offset in at which to begin writing data read from the stream.
count int The maximum number of bytes to read.
callback AsyncCallback An optional asynchronous callback, to be called when the read is complete.
state object A user-provided object that distinguishes this particular asynchronous read request from other requests.
리턴 IAsyncResult

BeginWrite() 공개 메소드

Begins an asynchronous write operation.
Attempted an asynchronous write past the end of the stream, or a disk error occurs. One or more of the arguments is invalid. Methods were called after the stream was closed. The current Stream implementation does not support the write operation.
public BeginWrite ( byte buffer, int offset, int count, AsyncCallback callback, object state ) : IAsyncResult
buffer byte The buffer to write data from.
offset int The byte offset in from which to begin writing.
count int The maximum number of bytes to write.
callback AsyncCallback An optional asynchronous callback, to be called when the write is complete.
state object A user-provided object that distinguishes this particular asynchronous write request from other requests.
리턴 IAsyncResult

Close() 공개 메소드

Closes the current stream and releases any resources (such as sockets and file handles) associated with the current stream.
public Close ( ) : void
리턴 void

Dispose() 보호된 메소드

Releases the unmanaged resources used by the System.IO.Stream and optionally releases the managed resources.
protected Dispose ( bool disposing ) : void
disposing bool true to release both managed and unmanaged resources; false to release only unmanaged resources
리턴 void

EndRead() 공개 메소드

Waits for the pending asynchronous read to complete.
is null. did not originate from a method on the current stream. The stream is closed or an internal error has occurred.
public EndRead ( IAsyncResult asyncResult ) : int
asyncResult IAsyncResult The reference to the pending asynchronous request to finish.
리턴 int

EndWrite() 공개 메소드

Ends an asynchronous write operation.
is null. did not originate from a method on the current stream. The stream is closed or an internal error has occurred.
public EndWrite ( IAsyncResult asyncResult ) : void
asyncResult IAsyncResult A reference to the outstanding asynchronous I/O request.
리턴 void

Flush() 공개 메소드

When overridden in a derived class, clears all buffers for this stream and causes any buffered data to be written to the underlying device.
An I/O error occurs.
public Flush ( ) : void
리턴 void

Read() 공개 메소드

When overridden in a derived class, reads a sequence of bytes from the current stream and advances the position within the stream by the number of bytes read.
The sum of and is larger than the buffer length. is null. or is negative. An I/O error occurs. The stream does not support reading. Methods were called after the stream was closed.
public Read ( byte buffer, int offset, int count ) : int
buffer byte An array of bytes. When this method returns, the buffer contains the specified byte array with the values between and ( + - 1) replaced by the bytes read from the current source.
offset int The zero-based byte offset in at which to begin storing the data read from the current stream.
count int The maximum number of bytes to be read from the current stream.
리턴 int

ReadByte() 공개 메소드

Reads a byte from the stream and advances the position within the stream by one byte, or returns -1 if at the end of the stream.
The stream does not support reading. Methods were called after the stream was closed.
public ReadByte ( ) : int
리턴 int

ReadOnlyStreamWrapper() 공개 메소드

Initializes a new instance of the ReadOnlyStreamWrapper class that wraps specified underlying stream.
public ReadOnlyStreamWrapper ( Stream baseStream ) : System
baseStream Stream
리턴 System

Seek() 공개 메소드

When overridden in a derived class, sets the position within the current stream.
An I/O error occurs. The stream does not support seeking, such as if the stream is constructed from a pipe or console output. Methods were called after the stream was closed.
public Seek ( long offset, SeekOrigin origin ) : long
offset long A byte offset relative to the parameter.
origin SeekOrigin A value of type indicating the reference point used to obtain the new position.
리턴 long

SetLength() 공개 메소드

When overridden in a derived class, sets the length of the current stream.
An I/O error occurs. The stream does not support both writing and seeking, such as if the stream is constructed from a pipe or console output. Methods were called after the stream was closed.
public SetLength ( long value ) : void
value long The desired length of the current stream in bytes.
리턴 void

Write() 공개 메소드

When overridden in a derived class, writes a sequence of bytes to the current stream and advances the current position within this stream by the number of bytes written.
public Write ( byte buffer, int offset, int count ) : void
buffer byte An array of bytes. This method copies bytes from to the current stream.
offset int The zero-based byte offset in at which to begin copying bytes to the current stream.
count int The number of bytes to be written to the current stream.
리턴 void

WriteByte() 공개 메소드

Writes a byte to the current position in the stream and advances the position within the stream by one byte.
An I/O error occurs. The stream does not support writing, or the stream is already closed. Methods were called after the stream was closed.
public WriteByte ( byte value ) : void
value byte The byte to write to the stream.
리턴 void