I'm just getting started with Clojure and would like to call a Java method that takes as arguments an input file to read and an output file to which to write. Both appear to be of type java.io.File. The method I would like to call is "parse" in this class:
http://htmltolatex.sourceforge.net/javadoc/cz/kebrt/html2latex/Parser.html
However, because I will be calling the method repeatedly, I would prefer to use in-memory objects rather than files on disk.
I have successfully loaded an instance of the Parser class with:
(def my_parser (cz.kebrt.html2latex.Parser.))
I believe that I have successfully created an in-memory file-like object from which to read using this command:
(def input-object (java.io.StringBufferInputStream. "this is a test"))
However, what kind of file like object should I pass to capture the output? (For the sake of completeness, I should mention that this output file is first used to construct an instance of ParserHandler, which is then passed to the parser created above. http://htmltolatex.sourceforge.net/javadoc/cz/kebrt/html2latex/ParserHandler.html)
Thank you for any advice.