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 toStringWriter
. Uses a non-synchronizedStringBuilder
by default instead of the synchronizedStringBuffer
, but also accepts anyAppendable
as the underlying destination. -
CharSequenceReader
: An alternative toStringReader
, but supports reading from anyCharSequence
in addition toString
. Optimizations included forString
,StringBuilder
,StringBuffer
, andCharBuffer
. -
NoFlushBufferedOutputStream
,NoFlushBufferedWriter
: Fixes / work-arounds for https://issues.apache.org/jira/browse/XALANJ-2500. Overridesflush()
to do nothing, unless called asflush(boolean)
withtrue
. (Previously discussed: Xalan-J Serialization Performance hindered by Flushing.) -
OutputStreamSplitter
,WriterSplitter
: Writes to zero or moreOuputStream
s orWriter
s as one. -
RandomAccessFileInputStream
,RandomAccessFileOutputStream
: Provides anInputStream
or anOutputStream
from aRandomAccessFile
.
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.
Download the com.ziesemer.utils.io-*.zip
distribution from here.
Please report any bugs or feature requests on the java.net Issue Tracker.
No comments:
Post a Comment