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
StreamStream subject to writing.
Properties
Endian
Gets or sets the endianness of the byte target.
public Endian Endian { get; set; }
Property Value
Position
Gets the current write position.
public long Position { get; }
Property Value
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
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
uintIndex of first position in
buffer
to write to byte target.count
uintNumber of bytes to write to byte target.
Write(double)
Write one double to target.
public void Write(double v)
Parameters
Write(short)
Write one short to target.
public void Write(short v)
Parameters
Write(int)
Write one int to target.
public void Write(int v)
Parameters
Write(long)
Write one long to target.
public void Write(long v)
Parameters
Write(float)
Write one float to target.
public void Write(float v)
Parameters
Write(ushort)
Write one ushort to target.
public void Write(ushort v)
Parameters
Write(uint)
Write one uint to target.
public void Write(uint v)
Parameters
Write(ulong)
Write one ulong to target.
public void Write(ulong v)
Parameters
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
uintIndex of first position in
buffer
to write to byte target.count
uintNumber of bytes to write to byte target.