Class RandomAccessMutableByteProvider

    • Constructor Detail

      • RandomAccessMutableByteProvider

        public RandomAccessMutableByteProvider​(java.io.File file)
                                        throws java.io.IOException
        Constructs a byte provider using the specified file
        Parameters:
        file - the file to open for random access
        Throws:
        java.io.FileNotFoundException - if the file does not exist
        java.io.IOException
      • RandomAccessMutableByteProvider

        public RandomAccessMutableByteProvider​(java.io.File file,
                                               java.lang.String permissions)
                                        throws java.io.IOException
        Constructs a byte provider using the specified file and permissions string
        Parameters:
        file - the file to open for random access
        string - indicating permissions used for open
        Throws:
        java.io.FileNotFoundException - if the file does not exist
        java.io.IOException
    • Method Detail

      • writeByte

        public void writeByte​(long index,
                              byte value)
                       throws java.io.IOException
        Description copied from interface: MutableByteProvider
        Writes a byte at the specified index.
        Specified by:
        writeByte in interface MutableByteProvider
        Parameters:
        index - the index to write the byte
        value - the value to write at the specified index
        Throws:
        java.io.IOException - if an I/O error occurs
        See Also:
        ghidra.app.util.bin.ByteProvider#writeByte(long, byte)
      • writeBytes

        public void writeBytes​(long index,
                               byte[] values)
                        throws java.io.IOException
        Description copied from interface: MutableByteProvider
        Writes a byte array at the specified index.
        Specified by:
        writeBytes in interface MutableByteProvider
        Parameters:
        index - the index to write the byte array
        values - the values to write at the specified index
        Throws:
        java.io.IOException - if an I/O error occurs
        See Also:
        ghidra.app.util.bin.ByteProvider#writeBytes(long, byte[])