Fellow Oak DICOM
Search Results for

    Show / Hide Table of Contents

    Class FileByteTarget

    Representation of a file byte target.

    Inheritance
    System.Object
    FileByteTarget
    Implements
    System.IDisposable
    IByteTarget
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: FellowOakDicom.IO
    Assembly: fo-dicom.core.dll
    Syntax
    public sealed class FileByteTarget : IDisposable, IByteTarget

    Constructors

    FileByteTarget(IFileReference)

    Initializes an instance of FileByteTarget.

    Declaration
    public FileByteTarget(IFileReference file)
    Parameters
    Type Name Description
    IFileReference file

    Properties

    Endian

    Gets or sets the endianness of the byte target.

    Declaration
    public Endian Endian { get; set; }
    Property Value
    Type Description
    Endian

    Position

    Gets the current write position.

    Declaration
    public long Position { get; }
    Property Value
    Type Description
    System.Int64

    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

    Declaration
    public Stream AsWritableStream()
    Returns
    Type Description
    System.IO.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.

    Declaration
    public void Dispose()

    Write(Byte)

    Write one System.Byte to target.

    Declaration
    public void Write(byte v)
    Parameters
    Type Name Description
    System.Byte v

    System.Byte to write.

    Write(Byte[], UInt32, UInt32)

    Write array of System.Bytes to target.

    Declaration
    public void Write(byte[] buffer, uint offset, uint count)
    Parameters
    Type Name Description
    System.Byte[] buffer

    Array of System.Bytes to write.

    System.UInt32 offset

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

    System.UInt32 count

    Number of bytes to write to byte target.

    Write(Double)

    Write one System.Double to target.

    Declaration
    public void Write(double v)
    Parameters
    Type Name Description
    System.Double v

    System.Double to write.

    Write(Int16)

    Write one System.Int16 to target.

    Declaration
    public void Write(short v)
    Parameters
    Type Name Description
    System.Int16 v

    System.Int16 to write.

    Write(Int32)

    Write one System.Int32 to target.

    Declaration
    public void Write(int v)
    Parameters
    Type Name Description
    System.Int32 v

    System.Int32 to write.

    Write(Int64)

    Write one System.Int64 to target.

    Declaration
    public void Write(long v)
    Parameters
    Type Name Description
    System.Int64 v

    System.Int64 to write.

    Write(Single)

    Write one System.Single to target.

    Declaration
    public void Write(float v)
    Parameters
    Type Name Description
    System.Single v

    System.Single to write.

    Write(UInt16)

    Write one System.UInt16 to target.

    Declaration
    public void Write(ushort v)
    Parameters
    Type Name Description
    System.UInt16 v

    System.UInt16 to write.

    Write(UInt32)

    Write one System.UInt32 to target.

    Declaration
    public void Write(uint v)
    Parameters
    Type Name Description
    System.UInt32 v

    System.UInt32 to write.

    Write(UInt64)

    Write one System.UInt64 to target.

    Declaration
    public void Write(ulong v)
    Parameters
    Type Name Description
    System.UInt64 v

    System.UInt64 to write.

    WriteAsync(Byte[], UInt32, UInt32)

    Asynchronously write array of System.Bytes to target.

    Declaration
    public Task WriteAsync(byte[] buffer, uint offset, uint count)
    Parameters
    Type Name Description
    System.Byte[] buffer

    Array of System.Bytes to write.

    System.UInt32 offset

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

    System.UInt32 count

    Number of bytes to write to byte target.

    Returns
    Type Description
    System.Threading.Tasks.Task

    Avaitable System.Threading.Tasks.Task.

    Implements

    System.IDisposable
    IByteTarget

    Extension Methods

    LinqExtensions.IsOneOf<T>(T, T[])
    In This Article
    Back to top Copyright (c) 2012-2025 fo-dicom contributors