MCPcopy Create free account
hub / github.com/alexandre-lavoie/python-log4rce / load

Method load

log4rce.py:76–83  ·  view source on GitHub ↗
(cls, path: str)

Source from the content-addressed store, hash-verified

74
75 @classmethod
76 def load(cls, path: str) -> "JavaClass":
77 with open(path, "rb") as h:
78 raw = h.read()
79
80 if not raw.startswith(b"\xca\xfe\xba\xbe"):
81 raise Exception(f"Trying to load non-compiled Java class `{path}`.")
82
83 return JavaClass(raw)
84
85 @classmethod
86 def str_size(cls, data: str) -> bytes:

Callers 1

mainFunction · 0.80

Calls 1

JavaClassClass · 0.85

Tested by

no test coverage detected