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.
(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.
(BufferedReader.
(InputStreamReader.
(.getInputStream jarfile (.getEntry jarfile entry-name)))))]
(read-ns-decl rdr)))
Comments top
No comments for read-ns-decl-from-jarfile-entry. Log in to add a comment.