Go to the documentation of this file.
9 #ifndef CPROVER_JAVA_BYTECODE_JAR_FILE_H
10 #define CPROVER_JAVA_BYTECODE_JAR_FILE_H
12 #include <unordered_map>
28 explicit jar_filet(
const std::string &filename);
49 std::unordered_map<std::string, std::string>
get_manifest();
52 std::vector<std::string>
filenames()
const;
65 #endif // CPROVER_JAVA_BYTECODE_JAR_FILE_H
std::unordered_map< std::string, size_t > m_name_to_index
Map of filename to the file index in the zip archive.
jar_filet & operator=(const jar_filet &)=delete
std::vector< std::string > filenames() const
Get list of filenames in the archive.
mz_zip_archivet m_zip_archive
nonstd::optional< T > optionalt
std::unordered_map< std::string, std::string > get_manifest()
Get contents of the Manifest file in the jar archive as a key-value map (both as strings)
Class representing a .jar archive.
jar_filet(const std::string &filename)
Open java file for reading.
optionalt< std::string > get_entry(const std::string &filename)
Get contents of a file in the jar archive.
void initialize_file_index()
Loads the fileindex (m_name_to_index) with a map of loaded files to indices.
Thin object-oriented wrapper around the MZ Zip library Zip file reader and extractor.