Class FitsDataBlockStream
- Namespace
- FitsModel.FitsStream
- Assembly
- FitsModel.dll
Reads FitsDataBlocks from a stream and forwards them to any registered DataBlockWriterBase instances.
public class FitsDataBlockStream : Stream, IDisposable, IAsyncDisposable
- Inheritance
-
FitsDataBlockStream
- Implements
- Inherited Members
Constructors
FitsDataBlockStream(DataBlockWriterBase)
Reads FitsDataBlocks from a stream and forwards them to any registered DataBlockWriterBase instances.
public FitsDataBlockStream(DataBlockWriterBase dataBlockWriter)
Parameters
dataBlockWriterDataBlockWriterBaseData block writer that will receive data blocks as they are read from the stream.
Properties
CanRead
Not implemented.
public override bool CanRead { get; }
Property Value
CanSeek
Not implemented.
public override bool CanSeek { get; }
Property Value
CanWrite
This stream will continuously accept data and write them to FitsDataBlocks.
public override bool CanWrite { get; }
Property Value
CancelToken
Cancellation token that can be used to flag any streams writing to this stream to stop.
public CancellationToken CancelToken { get; }
Property Value
DataBlockWriter
Writer that will receive full FitsDataBlocks as they are formed.
public IFitsDataBlockWriter DataBlockWriter { get; }
Property Value
Length
Not implemented.
public override long Length { get; }
Property Value
Position
Not implemented.
public override long Position { get; set; }
Property Value
Methods
ChunkMemoryStream(MemoryStream, int)
Splits a MemoryStream into chunks of size n.
public static List<byte[]> ChunkMemoryStream(MemoryStream stream, int n)
Parameters
streamMemoryStreamnint
Returns
Flush()
Not implemented.
public override void Flush()
Read(byte[], int, int)
Not implemented.
public override int Read(byte[] buffer, int offset, int count)
Parameters
Returns
Seek(long, SeekOrigin)
Not implemented.
public override long Seek(long offset, SeekOrigin origin)
Parameters
offsetlongoriginSeekOrigin
Returns
SetLength(long)
Not implemented.
public override void SetLength(long value)
Parameters
valuelong
Write(byte[], int, int)
Writes data to this stream. Data is buffered and chunked into 2880-byte FitsDataBlocks. Once a complete block is formed, it is forwarded to all registered DataBlockWriterBase instances.
public override void Write(byte[] buffer, int offset, int count)