The methods of this class create the various
Pipe
implementations:
PipeFactory.byteArrayRingBuffer(int)
A pipe which is backed by an (internal) byte array
PipeFactory.byteBufferRingBuffer(ByteBuffer)
A pipe which is backed by a
ByteBuffer
PipeFactory.elasticPipe()
A Pipe that implements infinite capacity and good performance by first allocating a small in-memory ring buffer,
then, if that fills up, a larger one that uses a memory-mapped file, and eventually one based on a random access
file with practically unlimited size
PipeFactory.elasticPipe(de.unkrig.commons.lang.protocol.ProducerWhichThrows)
A Pipe that implements infinite capacity by allocating delegate pipes as needed (and closing them when they are
no longer needed)
PipeFactory.mappedFileRingBuffer(java.io.File, int, boolean)
A pipe which is backed by a
memory-mapped file
, which will be
unmapped and (optionally) deleted when the pipe is closed
PipeFactory.mappedTempFileRingBuffer(int)
A pipe which is backed by a
memory-mapped
temporary file, which
will be unmapped and deleted when the pipe is closed
PipeFactory.randomAccessFileRingBuffer(java.io.File, long, boolean)
A pipe which is backed by a
RandomAccessFile
, which will (optionally) be deleted when the pipe is
closed
PipeFactory.randomAccessTempFileRingBuffer(long)
A pipe which is backed by a temporary
RandomAccessFile
, which is deleted when the pipe is closed
The characteristics of these implementations are as follows:
Performance
Resource usage
Size limits
byteArrayRingBuffer(int)
Fast
Heap memory
2 GB
byteBufferRingBuffer(ByteBuffer.allocate(int))
Fast
Heap memory
2 GB
byteBufferRingBuffer(ByteBuffer.allocateDirect(int))
Fast
Off-heap memory
2 GB
mappedFileRingBuffer(File, int, boolean)
Medium
Low
2 GB, Address space, disk space
randomAccessFileRingBuffer(File, long, boolean)
Low
Low
Disk space
PipeUtil - Class in de.unkrig.commons.io.pipe
Utility methods related to the
Pipe
interface.
PipeUtil.Drainer - Interface in de.unkrig.commons.io.pipe
Drains 'something' by reading data from an input stream.
PipeUtil.Filler - Interface in de.unkrig.commons.io.pipe
Fills 'something' by writing data to an output stream.
PipeUtil.FillerAndDrainer - Interface in de.unkrig.commons.io.pipe
PipeUtil.InputOutputStreams - Interface in de.unkrig.commons.io.pipe
ProxyInputStream - Class in de.unkrig.commons.io
ProxyInputStream(InputStream) - Constructor for class de.unkrig.commons.io.ProxyInputStream
ProxyOutputStream - Class in de.unkrig.commons.io
ProxyOutputStream(OutputStream) - Constructor for class de.unkrig.commons.io.ProxyOutputStream
put(byte[], int, int, long) - Method in class de.unkrig.commons.io.pipe.AbstractRingBuffer
Transfers len bytes from buf[off]...
to the backing store.
R
- randomAccessFileRingBuffer(File, long, boolean) - Static method in class de.unkrig.commons.io.pipe.PipeFactory
-
- randomAccessTempFileRingBuffer(long) - Static method in class de.unkrig.commons.io.pipe.PipeFactory
-
- randomInputStream(long) - Static method in class de.unkrig.commons.io.InputStreams
-
- randomInputStream(long) - Static method in class de.unkrig.commons.io.IoUtil
-
- read() - Method in class de.unkrig.commons.io.ByteFilterInputStream
-
- read(byte[], int, int) - Method in class de.unkrig.commons.io.ByteFilterInputStream
-
- read() - Method in class de.unkrig.commons.io.CharFilterReader
-
- read(char[], int, int) - Method in class de.unkrig.commons.io.CharFilterReader
-
- read() - Method in class de.unkrig.commons.io.ConcatInputStream
-
- read(byte[], int, int) - Method in class de.unkrig.commons.io.ConcatInputStream
-
- read() - Method in class de.unkrig.commons.io.CountingInputStream
-
Deprecated.
- read(byte[], int, int) - Method in class de.unkrig.commons.io.CountingInputStream
-
Deprecated.
- read() - Method in class de.unkrig.commons.io.CountingReader
-
- read(char[], int, int) - Method in class de.unkrig.commons.io.CountingReader
-
- read() - Method in class de.unkrig.commons.io.FixedLengthInputStream
-
- read(byte[], int, int) - Method in class de.unkrig.commons.io.FixedLengthInputStream
-
- read() - Method in class de.unkrig.commons.io.MarkableFileInputStream
-
- read(byte[], int, int) - Method in class de.unkrig.commons.io.MarkableFileInputStream
-
- read() - Method in class de.unkrig.commons.io.PercentEncodingInputStream
-
- read(byte[], int, int) - Method in class de.unkrig.commons.io.PercentEncodingInputStream
-
- read(byte[]) - Method in class de.unkrig.commons.io.pipe.AbstractPipe
-
- read(byte[], int, int) - Method in class de.unkrig.commons.io.pipe.AbstractRingBuffer
-
- read(byte[]) - Method in interface de.unkrig.commons.io.pipe.Pipe
-
Reads at most buf.length
bytes from this pipe into the buf.
- read(byte[], int, int) - Method in interface de.unkrig.commons.io.pipe.Pipe
-
Reads at most len bytes from this pipe into the buf at offset off.
- read() - Method in class de.unkrig.commons.io.ReaderInputStream
-
- read(byte[], int, int) - Method in class de.unkrig.commons.io.ReaderInputStream
-
- read() - Method in class de.unkrig.commons.io.TransformingFilterReader
-
- read(char[], int, int) - Method in class de.unkrig.commons.io.TransformingFilterReader
-
- read() - Method in class de.unkrig.commons.io.WyeInputStream
-
Deprecated.
- read(byte[], int, int) - Method in class de.unkrig.commons.io.WyeInputStream
-
Deprecated.
- read() - Method in class de.unkrig.commons.io.WyeReader
-
- read(char[], int, int) - Method in class de.unkrig.commons.io.WyeReader
-
- readAll(InputStream) - Static method in class de.unkrig.commons.io.InputStreams
-
Equivalent with readAll(is, false)
.
- readAll(InputStream, boolean) - Static method in class de.unkrig.commons.io.InputStreams
-
- readAll(InputStream, Charset, boolean) - Static method in class de.unkrig.commons.io.InputStreams
-
- readAll(InputStream) - Static method in class de.unkrig.commons.io.IoUtil
-
- readAll(InputStream, Charset, boolean) - Static method in class de.unkrig.commons.io.IoUtil
-
- readAll(Reader) - Static method in class de.unkrig.commons.io.IoUtil
-
- readAll(Reader, boolean) - Static method in class de.unkrig.commons.io.IoUtil
-
- readAll(Reader) - Static method in class de.unkrig.commons.io.Readers
-
- readAll(Reader, boolean) - Static method in class de.unkrig.commons.io.Readers
-
- readAllLines(Reader, boolean) - Static method in class de.unkrig.commons.io.LineUtil
-
Reads lines from the given reader until end-of-input.
- ReaderInputStream - Class in de.unkrig.commons.io
-
Reads characters from a delegate
Reader
and encodes them into data bytes.
- ReaderInputStream(Reader) - Constructor for class de.unkrig.commons.io.ReaderInputStream
-
- ReaderInputStream(Reader, String) - Constructor for class de.unkrig.commons.io.ReaderInputStream
-
- ReaderInputStream(Reader, Charset) - Constructor for class de.unkrig.commons.io.ReaderInputStream
-
- ReaderInputStream(Reader, CharsetEncoder) - Constructor for class de.unkrig.commons.io.ReaderInputStream
-
- Readers - Class in de.unkrig.commons.io
-
Utility functionality related to
Reader
s.
- readLineWithSeparator(Reader) - Static method in class de.unkrig.commons.io.LineUtil
-
Similar to
BufferedReader.readLine()
, except that
The produced strings
include the line separator
Not only CR, LF and CRLF are recognized as line terminators, but also some other special characters, as
described
here
- ready() - Method in class de.unkrig.commons.io.TransformingFilterReader
-
- register(SelectableChannel, int, RunnableWhichThrows<IOException>) - Method in class de.unkrig.commons.io.Multiplexer
-
- reset() - Method in class de.unkrig.commons.io.CountingInputStream
-
Deprecated.
- reset() - Method in class de.unkrig.commons.io.MarkableFileInputStream
-
- reset() - Method in class de.unkrig.commons.io.TransformingFilterReader
-
- run(InputStream, OutputStream) - Method in interface de.unkrig.commons.io.ByteFilter
-
- run(Reader, Writer) - Method in interface de.unkrig.commons.io.CharFilter
-
Reads chars from the given
Reader
(up to end-of-input or not), and writes chars to the given
Writer
.
- run(Writer) - Method in interface de.unkrig.commons.io.IoUtil.WritingRunnable
-
- run() - Method in class de.unkrig.commons.io.Multiplexer
-
Handles channels and timers; returns never.
S
- setDelegate(InputStream) - Method in class de.unkrig.commons.io.ProxyInputStream
-
- setDelegate(OutputStream) - Method in class de.unkrig.commons.io.ProxyOutputStream
-
- singlingFilterInputStream(InputStream) - Static method in class de.unkrig.commons.io.InputStreams
-
- singlingFilterInputStream(InputStream) - Static method in class de.unkrig.commons.io.IoUtil
-
- singlingFilterReader(Reader) - Static method in class de.unkrig.commons.io.IoUtil
-
- singlingFilterReader(Reader) - Static method in class de.unkrig.commons.io.Readers
-
- skip(long) - Method in class de.unkrig.commons.io.ConcatInputStream
-
- skip(long) - Method in class de.unkrig.commons.io.CountingInputStream
-
Deprecated.
- skip(long) - Method in class de.unkrig.commons.io.FixedLengthInputStream
-
- skip(InputStream, long) - Static method in class de.unkrig.commons.io.InputStreams
-
Skips n bytes on the inputStream.
- skip(InputStream, long) - Static method in class de.unkrig.commons.io.IoUtil
-
- skip(long) - Method in class de.unkrig.commons.io.MarkableFileInputStream
-
- skip(long) - Method in class de.unkrig.commons.io.PercentEncodingInputStream
-
- skip(long) - Method in class de.unkrig.commons.io.TransformingFilterReader
-
- skipAll(InputStream) - Static method in class de.unkrig.commons.io.InputStreams
-
Skips all remaining data on the inputStream.
- skipAll(InputStream) - Static method in class de.unkrig.commons.io.IoUtil
-
- split(ProducerWhichThrows<? extends OutputStream, ? extends IOException>, Producer<? extends Long>) - Static method in class de.unkrig.commons.io.IoUtil
-
- split(ProducerWhichThrows<? extends OutputStream, ? extends IOException>, Producer<? extends Long>) - Static method in class de.unkrig.commons.io.OutputStreams
-
Creates and returns an
OutputStream
which writes at most
byteCountLimits.produce()
bytes to
delegates.produce()
before closing it and writing the next
byteCountLimits.produce()
bytes to
delegates.produce()
, and so on.
- stop() - Method in class de.unkrig.commons.io.Multiplexer
-
T
- tee(OutputStream...) - Static method in class de.unkrig.commons.io.IoUtil
-
- tee(OutputStream...) - Static method in class de.unkrig.commons.io.OutputStreams
-
Creates and returns an
OutputStream
that delegates all work to the given
delegates:
The
write()
methods write the given data to all the delegates;
if any of these throw an
IOException
, it is rethrown, and it is undefined whether all the data was
written to all the delegates.
- TeeOutputStream - Class in de.unkrig.commons.io
-
- TeeOutputStream(OutputStream, OutputStream) - Constructor for class de.unkrig.commons.io.TeeOutputStream
-
Deprecated.
- temporaryStorage(PipeUtil.FillerAndDrainer) - Static method in class de.unkrig.commons.io.pipe.PipeUtil
-
- temporaryStorage(PipeUtil.Filler, PipeUtil.Drainer) - Static method in class de.unkrig.commons.io.pipe.PipeUtil
-
Creates a temporary
PipeFactory.elasticPipe()
, invokes the
filler (which fills the pipe),
then invokes the
drainer (which drains the pipe), and eventually closes the pipe.
- timer(long, Runnable) - Method in class de.unkrig.commons.io.Multiplexer
-
Registers the given runnable for exactly one execution by this
Multiplexer
's
Multiplexer.run()
method
when the current time is equal to (or slightly greater than)
expiry.
- transferFrom(ReadableByteChannel, long) - Method in class de.unkrig.commons.io.FileBufferedChannel
-
???
- TransformingFilterReader - Class in de.unkrig.commons.io
-
A
FilterReader
which transforms the character stream on-the-fly with a {@link Transformer
Transformer<?
- TransformingFilterReader(Reader, TransformerWhichThrows<? super CharSequence, ? extends CharSequence, ? extends IOException>) - Constructor for class de.unkrig.commons.io.TransformingFilterReader
-
- TransformingFilterWriter - Class in de.unkrig.commons.io
-
- TransformingFilterWriter(TransformerWhichThrows<? super CharSequence, ? extends CharSequence, ? extends IOException>, Appendable) - Constructor for class de.unkrig.commons.io.TransformingFilterWriter
-
U
- unclosable(InputStream) - Static method in class de.unkrig.commons.io.InputStreams
-
- unclosable(OutputStream) - Static method in class de.unkrig.commons.io.OutputStreams
-
- unclosableInputStream(InputStream) - Static method in class de.unkrig.commons.io.IoUtil
-
- UnclosableInputStream - Class in de.unkrig.commons.io
-
- UnclosableInputStream(InputStream) - Constructor for class de.unkrig.commons.io.UnclosableInputStream
-
Deprecated.
- unclosableOutputStream(OutputStream) - Static method in class de.unkrig.commons.io.IoUtil
-
- unclosableOutputStream(OutputStream) - Static method in class de.unkrig.commons.io.OutputStreams
-
- UnclosableOutputStream - Class in de.unkrig.commons.io
-
- UnclosableOutputStream(OutputStream) - Constructor for class de.unkrig.commons.io.UnclosableOutputStream
-
Deprecated.
V
- valueOf(String) - Static method in enum de.unkrig.commons.io.IoUtil.CollisionStrategy
-
Returns the enum constant of this type with the specified name.
- values() - Static method in enum de.unkrig.commons.io.IoUtil.CollisionStrategy
-
Returns an array containing the constants of this enum type, in
the order they are declared.
W
- write(int) - Method in class de.unkrig.commons.io.AsyncBufferedOutputStream
-
- write(byte[], int, int) - Method in class de.unkrig.commons.io.AsyncBufferedOutputStream
-
- write(int) - Method in class de.unkrig.commons.io.ByteFilterOutputStream
-
- write(byte[], int, int) - Method in class de.unkrig.commons.io.ByteFilterOutputStream
-
- write(int) - Method in class de.unkrig.commons.io.CharFilterWriter
-
- write(char[], int, int) - Method in class de.unkrig.commons.io.CharFilterWriter
-
- write(int) - Method in class de.unkrig.commons.io.CountingOutputStream
-
Deprecated.
- write(byte[], int, int) - Method in class de.unkrig.commons.io.CountingOutputStream
-
Deprecated.
- write(ByteBuffer) - Method in class de.unkrig.commons.io.FileBufferedChannel
-
- write(int) - Method in class de.unkrig.commons.io.FixedLengthOutputStream
-
- write(byte[], int, int) - Method in class de.unkrig.commons.io.FixedLengthOutputStream
-
- write(int) - Method in class de.unkrig.commons.io.HexOutputStream
-
- write(int) - Method in class de.unkrig.commons.io.PercentEncodingOutputStream
-
- write(byte[]) - Method in class de.unkrig.commons.io.pipe.AbstractPipe
-
- write(byte[], int, int) - Method in class de.unkrig.commons.io.pipe.AbstractRingBuffer
-
- write(byte[]) - Method in interface de.unkrig.commons.io.pipe.Pipe
-
Writes at most buf.length
bytes from buf to this pipe.
- write(byte[], int, int) - Method in interface de.unkrig.commons.io.pipe.Pipe
-
Writes at most len bytes from buf at offset off to this pipe.
- write(byte[], int, int) - Method in class de.unkrig.commons.io.ProxyOutputStream
-
- write(byte[]) - Method in class de.unkrig.commons.io.TeeOutputStream
-
Deprecated.
- write(byte[], int, int) - Method in class de.unkrig.commons.io.TeeOutputStream
-
Deprecated.
- write(int) - Method in class de.unkrig.commons.io.TeeOutputStream
-
Deprecated.
- write(char[], int, int) - Method in class de.unkrig.commons.io.TransformingFilterWriter
-
- write(String, int, int) - Method in class de.unkrig.commons.io.TransformingFilterWriter
-
- write(byte[], int, int) - Method in class de.unkrig.commons.io.UnclosableOutputStream
-
Deprecated.
- write(byte[], int, int) - Method in class de.unkrig.commons.io.WriterOutputStream
-
- write(int) - Method in class de.unkrig.commons.io.WriterOutputStream
-
- write(int) - Method in class de.unkrig.commons.io.XMLFormatterWriter
-
- write(char[], int, int) - Method in class de.unkrig.commons.io.XMLFormatterWriter
-
- write(String, int, int) - Method in class de.unkrig.commons.io.XMLFormatterWriter
-
- writeAndCount(ConsumerWhichThrows<? super OutputStream, ? extends IOException>, OutputStream) - Static method in class de.unkrig.commons.io.IoUtil
-
- writeAndCount(ConsumerWhichThrows<? super OutputStream, ? extends IOException>, OutputStream) - Static method in class de.unkrig.commons.io.OutputStreams
-
Invokes writeContents.consume()
with an output stream subject that writes the data through to
the given outputStream.
- writer(Appendable) - Static method in class de.unkrig.commons.io.Appendables
-
- WriterOutputStream - Class in de.unkrig.commons.io
-
Decodes the data bytes into characters, and writes them to a given delegate
Writer
.
- WriterOutputStream(Writer) - Constructor for class de.unkrig.commons.io.WriterOutputStream
-
- WriterOutputStream(Writer, String) - Constructor for class de.unkrig.commons.io.WriterOutputStream
-
- WriterOutputStream(Writer, Charset) - Constructor for class de.unkrig.commons.io.WriterOutputStream
-
- WriterOutputStream(Writer, CharsetDecoder) - Constructor for class de.unkrig.commons.io.WriterOutputStream
-
- Writers - Class in de.unkrig.commons.io
-
Utility functionality related to
Writer
s.
- writeUnencoded(int) - Method in class de.unkrig.commons.io.PercentEncodingOutputStream
-
Writes a given byte to the delegate without percent-encoding it.
- wye(InputStream, OutputStream) - Static method in class de.unkrig.commons.io.InputStreams
-
- wye(InputStream, OutputStream) - Static method in class de.unkrig.commons.io.IoUtil
-
- WyeInputStream - Class in de.unkrig.commons.io
-
- WyeInputStream(InputStream, OutputStream) - Constructor for class de.unkrig.commons.io.WyeInputStream
-
Deprecated.
- WyeReader - Class in de.unkrig.commons.io
-
Duplicates all bytes that it reads to a
Writer
.
- WyeReader(Reader, Writer) - Constructor for class de.unkrig.commons.io.WyeReader
-
X
- XMLFormatterWriter - Class in de.unkrig.commons.io
-
This
FilterWriter
scans the character stream for tags and inserts "artificial" line breaks as follows:
<a><b
Wrap between '>' and '<' and indent
</a><b
Wrap between '>' and '<'
<a/><b
Wrap between '>' and '<'
</a></b
Wrap between '>' and '<' and unindent
<a/></b
Wrap between '>' and '<' and unindent
- XMLFormatterWriter(Writer) - Constructor for class de.unkrig.commons.io.XMLFormatterWriter
-
Z
- ZERO - Static variable in class de.unkrig.commons.io.InputStreams
-
An input stream that reads an endless stream of zeros.
- ZERO_INPUT_STREAM - Static variable in class de.unkrig.commons.io.IoUtil
-
A B C D E F G H I L M N O P R S T U V W X Z
Copyright © 2018 Arno Unkrig. All rights reserved.