Table of Contents

Class StreamByteTarget

Namespace
FellowOakDicom.IO
Assembly
fo-dicom.core.dll

Representation of a stream byte target.

public class StreamByteTarget : IByteTarget
Inheritance
StreamByteTarget
Implements
Inherited Members
Extension Methods

Constructors

StreamByteTarget(Stream)

Initializes an instance of StreamByteTarget.

public StreamByteTarget(Stream stream)

Parameters

stream Stream

Stream subject to writing.

Properties

Endian

Gets or sets the endianness of the byte target.

public Endian Endian { get; set; }

Property Value

Endian

Position

Gets the current write position.

public long Position { get; }

Property Value

long

Methods

AsWritableStream()

Exposes the current byte target as a writable stream Do not dispose of this stream! It will be disposed when the byte target is disposed

public Stream AsWritableStream()

Returns

Stream

A stream that, when written to, will write to the underlying byte target

Write(byte)

Write one byte to target.

public void Write(byte v)

Parameters

v byte

byte to write.

Write(byte[], uint, uint)

Write array of bytes to target.

public void Write(byte[] buffer, uint offset, uint count)

Parameters

buffer byte[]

Array of bytes to write.

offset uint

Index of first position in buffer to write to byte target.

count uint

Number of bytes to write to byte target.

Write(double)

Write one double to target.

public void Write(double v)

Parameters

v double

double to write.

Write(short)

Write one short to target.

public void Write(short v)

Parameters

v short

short to write.

Write(int)

Write one int to target.

public void Write(int v)

Parameters

v int

int to write.

Write(long)

Write one long to target.

public void Write(long v)

Parameters

v long

long to write.

Write(float)

Write one float to target.

public void Write(float v)

Parameters

v float

float to write.

Write(ushort)

Write one ushort to target.

public void Write(ushort v)

Parameters

v ushort

ushort to write.

Write(uint)

Write one uint to target.

public void Write(uint v)

Parameters

v uint

uint to write.

Write(ulong)

Write one ulong to target.

public void Write(ulong v)

Parameters

v ulong

ulong to write.

WriteAsync(byte[], uint, uint)

Asynchronously write array of bytes to target.

public Task WriteAsync(byte[] buffer, uint offset, uint count)

Parameters

buffer byte[]

Array of bytes to write.

offset uint

Index of first position in buffer to write to byte target.

count uint

Number of bytes to write to byte target.

Returns

Task

Avaitable Task.