Class FileByteTarget
- Namespace
- FellowOakDicom.IO
- Assembly
- fo-dicom.core.dll
Representation of a file byte target.
public sealed class FileByteTarget : IDisposable, IByteTarget
- Inheritance
-
FileByteTarget
- Implements
- Inherited Members
- Extension Methods
Constructors
FileByteTarget(IFileReference)
Initializes an instance of FileByteTarget.
public FileByteTarget(IFileReference file)
Parameters
fileIFileReference
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
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()
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
bufferbyte[]Array of bytes to write.
offsetuintIndex of first position in
bufferto write to byte target.countuintNumber 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
bufferbyte[]Array of bytes to write.
offsetuintIndex of first position in
bufferto write to byte target.countuintNumber of bytes to write to byte target.