Package ghidra.app.util.bin
Class RandomAccessMutableByteProvider
- java.lang.Object
- 
- ghidra.app.util.bin.RandomAccessByteProvider
- 
- ghidra.app.util.bin.RandomAccessMutableByteProvider
 
 
- 
- All Implemented Interfaces:
- ByteProvider,- MutableByteProvider,- java.io.Closeable,- java.lang.AutoCloseable
 
 public class RandomAccessMutableByteProvider extends RandomAccessByteProvider implements MutableByteProvider An implementation of ByteProvider where the underlying bytes are supplied by a random access file.
- 
- 
Field Summary- 
Fields inherited from class ghidra.app.util.bin.RandomAccessByteProviderfile, randomAccessFile
 
- 
 - 
Constructor SummaryConstructors Constructor Description RandomAccessMutableByteProvider(java.io.File file)Constructs a byte provider using the specified fileRandomAccessMutableByteProvider(java.io.File file, java.lang.String permissions)Constructs a byte provider using the specified file and permissions string
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidwriteByte(long index, byte value)Writes a byte at the specified index.voidwriteBytes(long index, byte[] values)Writes a byte array at the specified index.- 
Methods inherited from class ghidra.app.util.bin.RandomAccessByteProviderclose, getAbsolutePath, getFile, getFSRL, getInputStream, getName, isValidIndex, length, readByte, readBytes, setFSRL
 - 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface ghidra.app.util.bin.ByteProviderclose, getAbsolutePath, getFile, getFSRL, getInputStream, getName, isValidIndex, length, readByte, readBytes
 
- 
 
- 
- 
- 
Constructor Detail- 
RandomAccessMutableByteProviderpublic RandomAccessMutableByteProvider(java.io.File file) throws java.io.IOExceptionConstructs 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
 
 - 
RandomAccessMutableByteProviderpublic RandomAccessMutableByteProvider(java.io.File file, java.lang.String permissions) throws java.io.IOExceptionConstructs 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- 
writeBytepublic void writeByte(long index, byte value) throws java.io.IOExceptionDescription copied from interface:MutableByteProviderWrites a byte at the specified index.- Specified by:
- writeBytein 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)
 
 - 
writeBytespublic void writeBytes(long index, byte[] values) throws java.io.IOExceptionDescription copied from interface:MutableByteProviderWrites a byte array at the specified index.- Specified by:
- writeBytesin 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[])
 
 
- 
 
-