java - Is there a pattern for re-using a BufferedWriter? -
I am reading XML files from a directory (containing thousands of files), processing the content and for each input File to write an output file. Is there a way to re-point out an existing It looks like It seems like a pre-adaptation to me Soft on the JVM Planet It is one of the best pieces of the software and can detect whether your objects are short-lived or not. This (and will also) can load a bottle of optimization. It is most likely that any micro- The result of optimization will be only in poor performance. Remedy is for optimizing performance, not a reason. BufferedWriter rather than creating a new instance for each file?
... scanner scanner; Buffed Writer Writer; File outfile; (File f: for directory listing file []) (scanner = new scanner (f); outfile = ...; // processing input author = new buffed vitter (new flumerwriter (new file (outfile)); // Content Writer Type Flush (); writer.close ();} ...
scanner and
BufferedWriter .
Comments
Post a Comment