(read-ns-decl-from-jarfile-entry jarfile entry-name)
Attempts to read a (ns ...) declaration from the named entry in the
JAR file, and returns the unevaluated form. Returns nil if the read
fails, or if the first form is not a ns declaration.
Source
(defn read-ns-decl-from-jarfile-entry
"Attempts to read a (ns ...) declaration from the named entry in the
JAR file, and returns the unevaluated form. Returns nil if the read
fails, or if the first form is not a ns declaration."
[^JarFile jarfile ^String entry-name]
(with-open [rdr (PushbackReader.
(io/reader
(.getInputStream jarfile (.getEntry jarfile entry-name))))]
(parse/read-ns-decl rdr)))