Package org.apache.commons.io.input
package org.apache.commons.io.input
Provides implementations of input classes, such as
InputStream
and Reader
.-
ClassDescriptionA filter reader that filters out characters where subclasses decide which characters to filter out.Proxy stream that closes and discards the underlying stream as soon as the end of input has been reached or when the stream is explicitly closed.Builds a new
AutoCloseInputStream
instance.This class is used to wrap a stream that includes an encodedByteOrderMark
as its first bytes.Builds a newBOMInputStream
instance.Reads bytes up to a maximum length, if its count goes above that, it stops.A reader that imposes a limit to the number of characters that can be read from an underlying reader, returning EOF when this limit is reached, regardless of state of underlying reader.Always throws anIOException
from all theInputStream
methods where the exception is declared.Always throws anIOException
from all theReader
methods where the exception is declared.InputStream
implementation which uses direct buffer to read a file to avoid extra copy of data between Java and native memory which happens when usingBufferedInputStream
.Builds a newBufferedFileChannelInputStream
instance.A filter reader that filters out a given character represented as anint
code point, handy to remove known junk characters from CSV files for example.A filter reader that removes a given set of characters represented asint
code points, handy to remove known junk characters from CSV files for example.Implements anInputStream
to read from String, StringBuffer, StringBuilder or CharBuffer.Builds a newCharSequenceInputStream
instance.Reader
implementation that can read from String, StringBuffer, StringBuilder or CharBuffer.AnInputStream
that repeats provided bytes for given target byte count.A special ObjectInputStream that loads a class based on a specifiedClassLoader
rather than the system default.Always returnsIOUtils.EOF
to all attempts to read something from the stream.Always returnsIOUtils.EOF
to all attempts to read something from it.Proxy stream that prevents the underlying input stream from being closed.Proxy reader that prevents the underlying reader from being closed.A decorating input stream that counts the number of bytes that have passed through the stream so far.Data written to this stream is forwarded to a stream that has been associated with this thread.AnInputStream
that infinitely repeats the provided bytes.This is an alternative toByteArrayInputStream
which removes the synchronization overhead for non-concurrent access; as such this class is not thread-safe.AnInputStream
that utilizes memory mapped files to improve performance.Builds a newMemoryMappedFileInputStream
instance.Deprecated.Builds a newMessageDigestCalculatingInputStream
instance.Maintains the message digest.This class is an example for using anObservableInputStream
.Builds newMessageDigestInputStream
instances.Maintains the message digest.A functional, light weightInputStream
that emulates a stream of a specified size.A functional, light weightReader
that emulates a reader of a specified size.TheObservableInputStream
allows, that an InputStream may be consumed by other receivers, apart from the thread, which is reading it.Abstracts observer callback forObservableInputStream
s.A Proxy stream which acts as expected, that is it passes the method calls on to the proxied stream and doesn't change which methods are being called.A Proxy stream which acts as expected, that is it passes the method calls on to the proxied stream and doesn't change which methods are being called.Simple alternative to JDKPipedInputStream
; queue input stream provides what's written in queue output stream.Builds a newQueueInputStream
instance.Streams data from aRandomAccessFile
starting at its current position.Builds a newRandomAccessFileInputStream
instance.ImplementsInputStream
to asynchronously read ahead from an underlying input stream when a specified amount of data has been read from the current buffer.Builds a newReadAheadInputStream
instance.InputStream
implementation that reads a character stream from aReader
and transforms it to a byte stream using a specified charset encoding.Builds a newReaderInputStream
instance.Reads lines in a file reversely (similar to a BufferedReader, but starting at the last line).Builds a newReversedLinesFileReader
instance.Provides the contents of multipleReader
s in sequence.DataInput for systems relying on little endian data formats.An input stream decorator that tags potential exceptions so that the stream that caused the exception can easily be identified.A reader decorator that tags potential exceptions so that the reader that caused the exception can easily be identified.Simple implementation of the UNIX "tail -f" functionality.Builds aTailer
with default values.Bridges access to a resource for random access, normally a file.A tailable resource like a file.Listener for events from aTailer
.TailerListener
Adapter.InputStream proxy that transparently writes a copy of all bytes read from the proxied stream to a given OutputStream.Reader proxy that transparently writes a copy of all characters read from the proxied reader to a given Reader.An observer with timestamps.Builds a newUncheckedBufferedReader
instance.Builds a newUncheckedFilterInputStream
instance.Builds a newUncheckedFilterReader
instance.A filtering input stream that ensures the content will have UNIX-style line endings, LF.An unsynchronized version ofBufferedInputStream
, not thread-safe.Builds a newUnsynchronizedBufferedInputStream
instance.This is an alternative toByteArrayInputStream
which removes the synchronization overhead for non-concurrent access; as such this class is not thread-safe.Builds a newUnsynchronizedByteArrayInputStream
instance.An unsynchronized version ofFilterInputStream
, not thread-safe.Builds a newUnsynchronizedFilterInputStream
instance.A filtering input stream that ensures the content will have Windows line endings, CRLF.Character stream that handles all the necessary Voodoo to figure out the charset encoding of the XML document within the stream.Builds a newXmlStreamWriter
instance.The XmlStreamReaderException is thrown by the XmlStreamReader constructors if the charset encoding can not be determined according to the XML 1.0 specification and RFC 3023.
MessageDigestInputStream
.