HexBox
Search Results for

    Show / Hide Table of Contents

    Class FileByteProvider

    Byte provider for (big) files.

    Inheritance
    object
    FileByteProvider
    Implements
    IByteProvider
    IDisposable
    Inherited Members
    object.GetType()
    object.MemberwiseClone()
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    Namespace: Be.Windows.Forms
    Assembly: Be.Windows.Forms.HexBox.dll
    Syntax
    public class FileByteProvider : IByteProvider, IDisposable

    Constructors

    View Source

    FileByteProvider(string)

    Initializes a new instance of the FileByteProvider class.

    Declaration
    public FileByteProvider(string fileName)
    Parameters
    Type Name Description
    string fileName

    Properties

    View Source

    FileName

    Gets the name of the file the byte provider is using.

    Declaration
    public string FileName { get; }
    Property Value
    Type Description
    string
    View Source

    Length

    Gets the length of the file.

    Declaration
    public long Length { get; }
    Property Value
    Type Description
    long

    Methods

    View Source

    ApplyChanges()

    Updates the file with all changes the write buffer contains.

    Declaration
    public void ApplyChanges()
    View Source

    DeleteBytes(long, long)

    Not supported

    Declaration
    public void DeleteBytes(long index, long length)
    Parameters
    Type Name Description
    long index
    long length
    View Source

    Dispose()

    Releases the file handle used by the FileByteProvider.

    Declaration
    public void Dispose()
    View Source

    ~FileByteProvider()

    Terminates the instance of the FileByteProvider class.

    Declaration
    protected ~FileByteProvider()
    View Source

    HasChanges()

    Returns a value if there are some changes.

    Declaration
    public bool HasChanges()
    Returns
    Type Description
    bool

    true, if there are some changes

    View Source

    InsertBytes(long, byte[])

    Not supported

    Declaration
    public void InsertBytes(long index, byte[] bs)
    Parameters
    Type Name Description
    long index
    byte[] bs
    View Source

    ReadByte(long)

    Reads a byte from the file.

    Declaration
    public byte ReadByte(long index)
    Parameters
    Type Name Description
    long index

    the index of the byte to read

    Returns
    Type Description
    byte

    the byte

    View Source

    RejectChanges()

    Clears the write buffer and reject all changes made.

    Declaration
    public void RejectChanges()
    View Source

    SupportsDeleteBytes()

    Returns false

    Declaration
    public bool SupportsDeleteBytes()
    Returns
    Type Description
    bool
    View Source

    SupportsInsertBytes()

    Returns false

    Declaration
    public bool SupportsInsertBytes()
    Returns
    Type Description
    bool
    View Source

    SupportsWriteByte()

    Returns true

    Declaration
    public bool SupportsWriteByte()
    Returns
    Type Description
    bool
    View Source

    WriteByte(long, byte)

    Writes a byte into write buffer

    Declaration
    public void WriteByte(long index, byte value)
    Parameters
    Type Name Description
    long index
    byte value

    Events

    View Source

    Changed

    Occurs, when the write buffer contains new changes.

    Declaration
    public event EventHandler Changed
    Event Type
    Type Description
    EventHandler
    View Source

    LengthChanged

    Never used.

    Declaration
    public event EventHandler LengthChanged
    Event Type
    Type Description
    EventHandler

    Implements

    IByteProvider
    IDisposable
    • View Source
    In this article
    Back to top Generated by DocFX