Package ghidra.app.util
Class ByteCopier
java.lang.Object
ghidra.app.util.ByteCopier
Base class that can copy bytes into a Transferable object, and paste bytes into a program.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classprotected classstatic class -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic DataFlavorstatic final ClipboardTypestatic DataFlavorstatic final ClipboardTypestatic DataFlavorstatic final ClipboardTypeprotected ProgramLocationprotected Programprotected ProgramSelectionprotected static final List<ClipboardType> static DataFlavorstatic final ClipboardTypestatic DataFlavorstatic final ClipboardTypeprotected PluginTool -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected TransferablecopyBytes(ClipboardType copyType, TaskMonitor monitor) protected TransferablecopyBytes(AddressSetView addresses, boolean includeSpaces, TaskMonitor monitor) protected StringcopyBytesAsString(AddressSetView addresses, boolean includeSpaces, TaskMonitor monitor) protected StringcopyBytesAsString(AddressSetView addresses, String delimiter, TaskMonitor monitor) static TransferableCreate a Transferable from the given text.protected AddressSetViewprotected booleanpasteBytes(Transferable pasteData) protected booleanpasteByteString(String string)
-
Field Details
-
BYTE_STRING_FLAVOR
-
BYTE_STRING_NO_SPACES_FLAVOR
-
PYTHON_BYTE_STRING_FLAVOR
-
PYTHON_LIST_FLAVOR
-
CPP_BYTE_ARRAY_FLAVOR
-
EMPTY_LIST
-
BYTE_STRING_TYPE
-
BYTE_STRING_NO_SPACE_TYPE
-
PYTHON_BYTE_STRING_TYPE
-
PYTHON_LIST_TYPE
-
CPP_BYTE_ARRAY_TYPE
-
tool
-
currentProgram
-
currentSelection
-
currentLocation
-
-
Constructor Details
-
ByteCopier
protected ByteCopier()
-
-
Method Details
-
getSelectedAddresses
-
copyBytes
protected Transferable copyBytes(AddressSetView addresses, boolean includeSpaces, TaskMonitor monitor) -
copyBytesAsString
protected String copyBytesAsString(AddressSetView addresses, boolean includeSpaces, TaskMonitor monitor) -
copyBytesAsString
-
copyBytes
-
pasteBytes
-
pasteByteString
-
createStringTransferable
Create a Transferable from the given text.- Parameters:
text- text used to create a Transferable- Returns:
- a Transferable
-