edtFTPnet/PRO - Secure FTP component for .NET | Free Trial | Pricing

FileSegmentStream Class

Used to read a segment of a file as defined by SegmentOffset and SegmentLength.

Definition

Namespace: EnterpriseDT.Util
Assembly: edtFTPnetPRO (in edtFTPnetPRO.dll) Version: 12.7.0.0
C#
public class FileSegmentStream : FileStream
Inheritance
Object    MarshalByRefObject    Stream    FileStream    FileSegmentStream

Constructors

FileSegmentStream(String, Int64, Int64, FileMode) Creates an instance of the FileSegmentStream class with the specified path, offset, length and creation mode.
FileSegmentStream(String, Int64, Int64, FileMode, FileAccess) Creates an instance of the FileSegmentStream class with the specified path, offset, length, creation mode and read/write permission.
FileSegmentStream(String, Int64, Int64, FileMode, FileAccess, FileShare) Creates an instance of the FileSegmentStream class with the specified path, offset, length, creation mode, read/write permission and share permission.
FileSegmentStream(String, Int64, Int64, FileMode, FileAccess, FileShare, Int32) Creates an instance of the FileSegmentStream class with the specified path, offset, length, creation mode, read/write permission, share permission and buffer-size.

Properties

CanReadGets a value indicating whether the current stream supports reading.
(Inherited from FileStream)
CanSeekGets a value indicating whether the current stream supports seeking.
(Inherited from FileStream)
CanTimeoutGets a value that determines whether the current stream can time out.
(Inherited from Stream)
CanWriteGets a value indicating whether the current stream supports writing.
(Inherited from FileStream)
HandleGets the operating system file handle for the file that the current FileStream object encapsulates.
(Inherited from FileStream)
Obsolete
IsAsyncGets a value indicating whether the FileStream was opened asynchronously or synchronously.
(Inherited from FileStream)
LengthGets the length in bytes of the stream.
(Inherited from FileStream)
NameGets the name of the FileStream that was passed to the constructor.
(Inherited from FileStream)
PositionGets or sets the current position of this stream.
(Inherited from FileStream)
ReadTimeoutGets or sets a value, in miliseconds, that determines how long the stream will attempt to read before timing out.
(Inherited from Stream)
SafeFileHandleGets a SafeFileHandle object that represents the operating system file handle for the file that the current FileStream object encapsulates.
(Inherited from FileStream)
SegmentLength Length of segment to read.
SegmentOffset Offset of segment to read.
WriteTimeoutGets or sets a value, in miliseconds, that determines how long the stream will attempt to write before timing out.
(Inherited from Stream)

Methods

BeginReadBegins an asynchronous read operation. (Consider using ReadAsync(Byte, Int32, Int32, CancellationToken) instead; see the Remarks section.)
(Inherited from FileStream)
BeginWriteBegins an asynchronous write operation. (Consider using WriteAsync(Byte, Int32, Int32, CancellationToken) instead; see the Remarks section.)
(Inherited from FileStream)
CloseCloses the current stream and releases any resources (such as sockets and file handles) associated with the current stream. Instead of calling this method, ensure that the stream is properly disposed.
(Inherited from Stream)
CopyTo(Stream)Reads the bytes from the current stream and writes them to another stream.
(Inherited from Stream)
CopyTo(Stream, Int32)Reads the bytes from the current stream and writes them to another stream, using a specified buffer size.
(Inherited from Stream)
CopyToAsync(Stream)Asynchronously reads the bytes from the current stream and writes them to another stream.
(Inherited from Stream)
CopyToAsync(Stream, Int32)Asynchronously reads the bytes from the current stream and writes them to another stream, using a specified buffer size.
(Inherited from Stream)
CopyToAsync(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)
CreateObjRefCreates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.
(Inherited from MarshalByRefObject)
CreateWaitHandleAllocates a WaitHandle object.
(Inherited from Stream)
Obsolete
DisposeReleases all resources used by the Stream.
(Inherited from Stream)
Dispose(Boolean)Releases the unmanaged resources used by the FileStream and optionally releases the managed resources.
(Inherited from FileStream)
EndReadWaits for the pending asynchronous read operation to complete. (Consider using ReadAsync(Byte, Int32, Int32, CancellationToken) instead; see the Remarks section.)
(Inherited from FileStream)
EndWriteEnds an asynchronous write operation and blocks until the I/O operation is complete. (Consider using WriteAsync(Byte, Int32, Int32, CancellationToken) instead; see the Remarks section.)
(Inherited from FileStream)
EqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
FinalizeEnsures that resources are freed and other cleanup operations are performed when the garbage collector reclaims the FileStream.
(Inherited from FileStream)
FlushClears buffers for this stream and causes any buffered data to be written to the file.
(Inherited from FileStream)
Flush(Boolean)Clears buffers for this stream and causes any buffered data to be written to the file, and also clears all intermediate file buffers.
(Inherited from FileStream)
FlushAsyncAsynchronously clears all buffers for this stream and causes any buffered data to be written to the underlying device.
(Inherited from Stream)
FlushAsync(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 FileStream)
GetAccessControlGets a FileSecurity object that encapsulates the access control list (ACL) entries for the file described by the current FileStream object.
(Inherited from FileStream)
GetHashCodeServes as the default hash function.
(Inherited from Object)
GetLifetimeServiceRetrieves the current lifetime service object that controls the lifetime policy for this instance.
(Inherited from MarshalByRefObject)
GetTypeGets the Type of the current instance.
(Inherited from Object)
InitializeLifetimeServiceObtains a lifetime service object to control the lifetime policy for this instance.
(Inherited from MarshalByRefObject)
LockPrevents other processes from reading from or writing to the FileStream.
(Inherited from FileStream)
MemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
MemberwiseClone(Boolean)Creates a shallow copy of the current MarshalByRefObject object.
(Inherited from MarshalByRefObject)
ObjectInvariantProvides support for a Contract.
(Inherited from Stream)
Obsolete
Read
(Overrides FileStreamRead(Byte, Int32, Int32))
ReadAsync(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)
ReadAsync(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 FileStream)
ReadByteReads a byte from the file and advances the read position one byte.
(Inherited from FileStream)
SeekSets the current position of this stream to the given value.
(Inherited from FileStream)
SetAccessControlApplies access control list (ACL) entries described by a FileSecurity object to the file described by the current FileStream object.
(Inherited from FileStream)
SetLengthSets the length of this stream to the given value.
(Inherited from FileStream)
ToStringReturns a string that represents the current object.
(Inherited from Object)
UnlockAllows access by other processes to all or part of a file that was previously locked.
(Inherited from FileStream)
WriteWrites a block of bytes to the file stream.
(Inherited from FileStream)
WriteAsync(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)
WriteAsync(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 FileStream)
WriteByteWrites a byte to the current position in the file stream.
(Inherited from FileStream)

See Also