메소드 | 설명 | |
---|---|---|
CopyTo ( Stream destinationStream, long startPosition, long length, int writeBufferSize, double timeoutMSPerKBWrite = 1000, int minTimeoutMS = 500 ) : double |
Copies data specified by start and length properties from internal stream to the provided stream.
|
|
Dispose ( ) : void |
Disposes the internal stream if DiposeInnerStreamOnDispose is true. Use Close() to close the inner stream regardless of DiposeInnerStreamOnDispose.
|
|
Dispose ( bool forceDispose ) : void |
Disposes the internal stream. If DiposeInnerStreamOnDispose is false, forceDispose must be true to dispose of the internal stream.
|
|
Flush ( ) : void | ||
GetBuffer ( ) : byte[] |
Attempts to return the buffer associated with the internal stream. In certain circumstances this is more efficient than copying the stream contents into a new buffer using ToArray. If the internal stream is not a memory stream will throw InvalidCastException. If access to the buffer is not allowed will throw an UnauthorizedAccessException.
|
|
MD5 ( ) : string |
Return the MD5 hash of the current ThreadSafeStream as a string
|
|
MD5 ( long start, int length ) : string |
Return the MD5 hash of part of the current ThreadSafeStream as a string
|
|
Read ( byte buffer, int offset, int count ) : int | ||
Seek ( long offset, SeekOrigin origin ) : long | ||
SetLength ( long value ) : void | ||
ThreadSafeStream ( Stream stream ) : System |
Create a thread safe stream. Once any actions are complete the stream must be correctly disposed by the user.
|
|
ThreadSafeStream ( Stream stream, bool closeStreamAfterSend ) : System |
Create a thread safe stream.
|
|
ToArray ( int numberZeroBytesPrefex ) : byte[] |
Returns data from entire Stream
|
|
ToArray ( long start, long length, int numberZeroBytesPrefix, int numberZeroBytesAppend ) : byte[] |
Returns data from the specified portion of Stream
|
|
Write ( byte buffer, int offset, int count ) : void | ||
Write ( byte buffer, long startPosition ) : void |
Writes the provided buffer to the internal stream starting at the provided position within the internal stream
|
public CopyTo ( Stream destinationStream, long startPosition, long length, int writeBufferSize, double timeoutMSPerKBWrite = 1000, int minTimeoutMS = 500 ) : double | ||
destinationStream | Stream | The destination stream to write to |
startPosition | long | |
length | long | |
writeBufferSize | int | The buffer size to use for copying stream contents |
timeoutMSPerKBWrite | double | The timouts in milliseconds per KB to write |
minTimeoutMS | int | The minimum time allowed for any sized copy |
리턴 | double |
public Dispose ( bool forceDispose ) : void | ||
forceDispose | bool | If true the internal stream will be disposed regardless of |
리턴 | void |
public MD5 ( long start, int length ) : string | ||
start | long | The start position in the stream |
length | int | The length of stream to MD5 |
리턴 | string |
public Read ( byte buffer, int offset, int count ) : int | ||
buffer | byte | |
offset | int | |
count | int | |
리턴 | int |
public Seek ( long offset, SeekOrigin origin ) : long | ||
offset | long | |
origin | SeekOrigin | |
리턴 | long |
public ThreadSafeStream ( Stream stream ) : System | ||
stream | Stream | The stream to make thread safe |
리턴 | System |
public ThreadSafeStream ( Stream stream, bool closeStreamAfterSend ) : System | ||
stream | Stream | The stream to make thread safe. |
closeStreamAfterSend | bool | If true the provided stream will be disposed once data has been written to the network. If false the stream must be disposed of correctly by the user |
리턴 | System |
public ToArray ( int numberZeroBytesPrefex ) : byte[] | ||
numberZeroBytesPrefex | int | If non zero will append N 0 value bytes to the start of the returned array |
리턴 | byte[] |
public ToArray ( long start, long length, int numberZeroBytesPrefix, int numberZeroBytesAppend ) : byte[] | ||
start | long | The start position of the desired bytes |
length | long | The total number of desired bytes, not including the zero byte prefix and append parameters |
numberZeroBytesPrefix | int | If non zero will append N 0 value bytes to the start of the returned array |
numberZeroBytesAppend | int | If non zero will append N 0 value bytes to the end of the returned array |
리턴 | byte[] |
public Write ( byte buffer, int offset, int count ) : void | ||
buffer | byte | |
offset | int | |
count | int | |
리턴 | void |
public Write ( byte buffer, long startPosition ) : void | ||
buffer | byte | |
startPosition | long | |
리턴 | void |