MarkUtils-IO is another high-performance addition to MarkUtils, and is a collection of utility classes that I've found myself frequently reusing over the past number of years.
AppendableWriter: A faster alternative to
StringWriter. Uses a non-synchronized
StringBuilderby default instead of the synchronized
StringBuffer, but also accepts any
Appendableas the underlying destination.
CharSequenceReader: An alternative to
StringReader, but supports reading from any
CharSequencein addition to
String. Optimizations included for
NoFlushBufferedWriter: Fixes / work-arounds for https://issues.apache.org/jira/browse/XALANJ-2500. Overrides
flush()to do nothing, unless called as
true. (Previously discussed: Xalan-J Serialization Performance hindered by Flushing.)
WriterSplitter: Writes to zero or more
Writers as one.
RandomAccessFileOutputStream: Provides an
Work on this library was also the driving factor for another recent post concerning some of Java's built-in code, Redundant argument validation code in Java IO classes.
com.ziesemer.utils.io is available on ziesemer.java.net under the GPL license, complete with source code, a compiled .jar, generated JavaDocs, and a suite of 40+ JUnit tests.
com.ziesemer.utils.io-*.zip distribution from here.
Please report any bugs or feature requests on the java.net Issue Tracker.