Package ghidra.framework.protocol.ghidra
Class GhidraURLWrappedContent
java.lang.Object
ghidra.framework.protocol.ghidra.GhidraURLWrappedContent
GhidraURLWrappedContent
provides controlled access to a Ghidra folder/file
associated with a Ghidra URL. It is important to note the issuance of this object does
not guarantee existence of the requested resource. Any object obtained via the getContent
method must be released via the release method. The following rules should be followed
when using domain folder and files obtained.
- The getContent method may only be invoked once per consumer
- The content must be released when no longer in-use, however it should not be released until any derivative domain folders and files are no longer in use as well.
- A read-only or immutable domain object may remain open while the associated domain file/folder is released.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetContent
(Object consumer) Get the domain folder or file associated with the Ghidra URL.void
Indicates the content object previously obtained from this wrapper is no longer in-use and the underlying connection may be closed.
-
Constructor Details
-
GhidraURLWrappedContent
-
-
Method Details
-
getContent
Get the domain folder or file associated with the Ghidra URL. The consumer is responsible for releasing the content object via the release method when it is no longer in use (seerelease(Object, Object)
}).- Parameters:
consumer
- object which is responsible for releasing the content- Returns:
- domain file or folder
- Throws:
IOException
- if an IO error occursFileNotFoundException
- if the Ghidra URL does no correspond to a folder or file within the Ghidra repository/project.- See Also:
-
release
Indicates the content object previously obtained from this wrapper is no longer in-use and the underlying connection may be closed. A read-only or immutable domain object may remain open and in-use after its associated domain folder/file has been released.- Parameters:
content
- object obtained viagetContent(Object)
consumer
- object consumer which was specified togetContent(Object)
-