Module org.refcodes.io
Package org.refcodes.io
package org.refcodes.io
This artifact defines basic types handling communication between processes
(across system boundaries), to be harnessed by complex and low level I/O,
such as the
InputStream
decorator types
ReplayInputStream
,
FilterInputStream
,
ClipboardInputStream
,
ZipFileInputStream
,
ReplaceInputStream
or
TimeoutInputStream
alongside
AvailableInputStream
as well as the
OutputStream
decorator types
ClipboardOutputStream
,
LineBreakOutputStream
or
ZipFileOutputStream
.
Please refer to the refcodes-io: Paving the road for complex and low level I/O across boundaries documentation for an up-to-date and detailed description on the usage of this artifact.
-
ClassDescriptionThe
AbstractBytesDestination
is a base abstract implementation of theBytesDestination
interface providing common functionality for concrete real implementations.TheAbstractBytesReceiver
is a base abstract implementation of theBytesReceiver
interface providing common functionality for concrete real live implementations.The Class ConnectableAutomaton.TheAbstractBytesTransmitter
is a base abstract implementation of theBytesTransmitter
interface providing common functionality for concrete real live implementations.AbstractDatagramsReceiver<DATA extends Serializable>TheAbstractDatagramsReceiver
is a base abstract implementation of theDatagramsReceiver
interface providing common functionality for concrete real live implementations.AbstractDatagramsTransmitter<DATA extends Serializable>TheAbstractDatagramsTransmitter
is a base abstract implementation of theBytesTransmitter
interface providing common functionality for concrete real live implementations.Abstract implementation of theBytesReceiver
interface.AbstractInputStreamReceiver<DATA extends Serializable>Abstract implementation of theDatagramsReceiver
interface.Abstract implementation of theBytesReceiver
interface.AbstractPrefetchInputStreamReceiver<DATA extends Serializable>Abstract implementation of theDatagramsReceiver
interface.TheAbstractShortsDestination
is a base abstract implementation of theShortsDestination
interface providing common functionality for concrete real live implementations.TheAbstractShortsReceiver
is a base abstract implementation of theShortsReceiver
interface providing common functionality for concrete real live implementations.The Class ConnectableAutomaton.TheAbstractShortsTransmitter
is a base abstract implementation of theShortsTransmitter
interface providing common functionality for concrete real liveShortsTransmitter
andShortsTransmitter
(=ShortsTransmitter
) implementations.TheAvailability
interface defines methods to test availability of data.TheAvailableInputStream
decorates anInputStream
with time-out functionality using theInputStream.available()
method.BidirectionalConnectionByteTransceiver<INPUT,OUTPUT> TheBidirectionalConnectionByteTransceiver
defines theDatagramTransceiver
functionality set on top of a I/O connection (as of theBidirectionalConnectionComponent.BidirectionalConnectionAutomaton
).TheBidirectionalConnectionTransceiver
defines theDatagramTransceiver
functionality set on top of a I/O connection (as of theBidirectionalConnectionComponent.BidirectionalConnectionAutomaton
).The Class BidirectionalStreamByteTransceiver.ABidirectionalStreamConnectionByteTransceiver
is aDatagramTransceiver
connected through I/O streams with anotherBidirectionalStreamConnectionByteTransceiver
.The Class BidirectionalStreamConnectionByteTransceiverImpl.BidirectionalStreamConnectionTransceiver<DATA extends Serializable>ABidirectionalStreamConnectionTransceiver
is aDatagramTransceiver
connected through I/O streams with anotherBidirectionalStreamConnectionTransceiver
.BidirectionalStreamConnectionTransceiverImpl<DATA extends Serializable>The Class BidirectionalStreamConnectionTransceiverImpl.BidirectionalStreamTransceiver<DATA extends Serializable>The Class BidirectionalStreamTransceiver.ABijectiveOutputStream
wraps anOutputStream
and produces output bytes by applying aBijectiveFunction
on each byte to be written before delegating the processed vale to the givenOutputStream
.TheBlockingInputStream
wraps anInputStream
adding blocking functionality, e.g. when trying to read, the read operation is blocked tillBlockingInputStream.available()
returns a value greater than 0.ABoundedInputStream
decorates anInputStream
and restricts reading bytes from theInputStream
decoratee up to a given total number of bytes (bounds).The Class ByteArrayReceiver.The Class ByteArraySource.TheByteDestination
is used to receive bytes in a unified way.TheByteReceiver
is used to receive bytes in a unified way.TheBytesDestination
is used to receive byte blocks (arrays) in a unified way.(asInputStream
does not provide some useful *interface*)TheByteSource
is used to send bytes in a unified way.(asOutputStream
does not provide some useful *interface*)The Interface BytesReceiver.TheBytesReceiverDecorator
decorates aBytesDestination
with the additional methods of aBytesReceiver
making it easy to use aBytesDestination
wherever aBytesReceiver
is expected.TheBytesSource
is used to send byte blocks (arrays) in a unified way.ABytesTransceiver
combines the functionality of aBytesTransmitter
and of aBytesReceiver
. e.g. for building loopback devices.The Interface BytesTransmitter.Combines theByteTransmitter
andByteReceiver
functionality in a single interface to be implemented by a single class so thatByteTransmitter
andByteReceiver
functionality can be provided by a single instance.TheByteTransmitter
is used to transmit bytes in a unified way.TheByteTransmitterDecorator
decorates aBytesSource
with the additional methods of aBytesTransmitter
making it easy to use aBytesSource
wherever aBytesTransmitter
is expected.AClipboardInputStream
provides the clipboard asInputStream
.AClipboardOutputStream
writes into the clipboard afterClipboardOutputStream.flush()
as well asClipboardOutputStream.close()
being called.TheConnectionBytesReceiver
defines theDatagramReceiver
functionality set on top of a connection (as of theConnectionComponent.ConnectionAutomaton
) for data types "byte".TheConnectionBytesTransceiver
defines theDatagramTransceiver
functionality set on top of a connection (as of theConnectionComponent.ConnectionAutomaton
) for data types "byte".TheConnectionBytesTransmitter
defines theDatagramTransmitter
functionality set on top of a connection (as of theConnectionComponent.ConnectionAutomaton
) for data types "byte".TheConnectionDatagramsReceiver
defines theDatagramReceiver
functionality set on top of a connection (as of theConnectionComponent.ConnectionAutomaton
).TheConnectionDatagramsTransceiver
defines theDatagramTransceiver
functionality set on top of a connection (as of theConnectionComponent.ConnectionAutomaton
).TheConnectionDatagramsTransmitter
defines theDatagramTransmitter
functionality set on top of a connection (as of theConnectionComponent.ConnectionAutomaton
).TheConnectionShortsReceiver
defines theDatagramReceiver
functionality set on top of a connection (as of theConnectionComponent.ConnectionAutomaton
) for data types "short".TheConnectionShortsTransceiver
defines theDatagramTransceiver
functionality set on top of a connection (as of theConnectionComponent.ConnectionAutomaton
) for data types "short".TheConnectionShortsTransmitter
defines theDatagramTransmitter
functionality set on top of a connection (as of theConnectionComponent.ConnectionAutomaton
) for data types "short".DatagramDestination<DATA extends Serializable>TheDatagramDestination
is used to receive datagrams in a unified way.DatagramReceiver<DATA extends Serializable>TheDatagramReceiver
is used to receive datagrams in a unified way.DatagramsDestination<DATA extends Serializable>TheDatagramsDestination
is used to receive data blocks (arrays) in a unified way.DatagramSource<DATA extends Serializable>TheDatagramSource
is used to send datagrams in a unified way.DatagramsReceiver<DATA extends Serializable>The Interface DatagramsReceiver.DatagramsReceiverDecorator<DATA extends Serializable>TheDatagramsReceiverDecorator
decorates aDatagramsDestination
with the additional methods of aDatagramsReceiver
making it easy to use aDatagramsDestination
wherever aDatagramsReceiver
is expected.DatagramsSource<DATA extends Serializable>TheDatagramsSource
is used to send datagram blocks (arrays) in a unified way.DatagramsTransceiver<DATA extends Serializable>ADatagramsTransceiver
combines the functionality of aDatagramsTransmitter
and of aDatagramsReceiver
. e.g. for building loopback devices.DatagramsTransmitter<DATA extends Serializable>TheDatagramsTransmitter
is used to send datagram blocks (arrays) in a unified way.DatagramTransceiver<DATA extends Serializable>Combines theDatagramTransmitter
andDatagramReceiver
functionality in a single interface to be implemented by a single class so thatDatagramTransmitter
andDatagramReceiver
functionality can be provided by a single instance.DatagramTransmitter<DATA extends Serializable>TheDatagramTransmitter
is used to send datagrams in a unified way.TheFileUtility
provides Various file related utility functionality.TheFilterInputStream
wraps anInputStream
adding filtering functionality of bytes to be skipped.AHexOutputStream
wraps anOutputStream
printing out the bytes written to theHexOutputStream
as hexadecimal text to the wrappedOutputStream
.The Class InputStreamByteReceiver.AInputStreamConnectionByteReceiver
is aDatagramReceiver
connected through I/O streams with aOutputStreamConnectionDatagramsTransmitter
.Implementation of theInputStreamConnectionReceiver
interface.InputStreamConnectionReceiver<DATA extends Serializable>AInputStreamConnectionReceiver
is aDatagramReceiver
connected through I/O streams with aOutputStreamConnectionDatagramsTransmitter
.InputStreamConnectionReceiverImpl<DATA extends Serializable>Implementation of theInputStreamConnectionReceiver
interface.InputStreamReceiver<DATA extends Serializable>The Class InputStreamReceiver.TheInputStreamTap
decorates anInputStreamTap
by tapping (sniffing data from) anInputStream
and besides returning the read data writes it to the providedOutputStream
.AInverseInputStream
wraps anInputStream
and consumes input bytes by applying aInverseFunction
on each byte read from the providedInputStream
before passing back the processed byte to the caller.IOResultAccessor<RES,EXC extends Exception> Extends theResultAccessor
interface with an I/O timeout mechanism.ALineBreakOutputStream
wraps anOutputStream
for adding line breaks after a given number of bytes being written.ALoopbackBytesReceiver
is aDatagramReceiver
connected directly within the same JVM with aLoopbackBytesTransmitter
; a "loopback" connection is used for establishing the connection which cannot be accessed outside the JVM or the running machine.ALoopbackBytesTransceiver
is aDatagramTransceiver
connected directly within the same JVM with anotherLoopbackBytesTransceiver
; a "loopback" connection is used for establishing the connection which cannot be accessed outside the JVM or the running machine.ALoopbackBytesTransmitter
is aDatagramTransmitter
connected directly within the same JVM with aLoopbackBytesReceiver
; a "loopback" connection is used for establishing the connection which cannot be accessed outside the JVM or the running machine.LoopbackDatagramsReceiver<DATA extends Serializable>ALoopbackDatagramsReceiver
is aDatagramReceiver
connected directly within the same JVM with aLoopbackDatagramsTransmitter
; a "loopback" connection is used for establishing the connection which cannot be accessed outside the JVM or the running machine.LoopbackDatagramsTransceiver<DATA extends Serializable>ALoopbackDatagramsTransceiver
is aDatagramTransceiver
connected directly within the same JVM with anotherLoopbackDatagramsTransceiver
; a "loopback" connection is used for establishing the connection which cannot be accessed outside the JVM or the running machine.LoopbackDatagramsTransmitter<DATA extends Serializable>ALoopbackDatagramsTransmitter
is aDatagramTransmitter
connected directly within the same JVM with aLoopbackDatagramsReceiver
; a "loopback" connection is used for establishing the connection which cannot be accessed outside the JVM or the running machine.ALoopbackShortsReceiver
is aDatagramReceiver
connected directly within the same JVM with aLoopbackShortsTransmitter
; a "loopback" connection is used for establishing the connection which cannot be accessed outside the JVM or the running machine.ALoopbackShortsTransceiver
is aDatagramTransceiver
connected directly within the same JVM with anotherLoopbackShortsTransceiver
; a "loopback" connection is used for establishing the connection which cannot be accessed outside the JVM or the running machine.ALoopbackShortsTransmitter
is aDatagramTransmitter
connected directly within the same JVM with aLoopbackBytesReceiver
; a "loopback" connection is used for establishing the connection which cannot be accessed outside the JVM or the running machine.Provides an accessor for a maximum connections property.MaxConnectionsAccessor.MaxConnectionsBuilder<B extends MaxConnectionsAccessor.MaxConnectionsBuilder<B>>Provides a builder method for a maximum connections property returning the builder for applying multiple build operations.Provides a mutator for a maximum connections property.Provides a maximum connections property.The Class OutputStreamBytesTransmitter.AOutputStreamComposite
wraps multipleOutputStream
instances to which to dispatch any operation applied to theOutputStreamComposite
instance.AOutputStreamConnectionBytesTransmitter
is aDatagramTransmitter
connected through I/O streams with aInputStreamConnectionReceiver
.OutputStreamConnectionDatagramsTransmitter<DATA extends Serializable>AOutputStreamConnectionDatagramsTransmitter
is aDatagramTransmitter
connected through I/O streams with aInputStreamConnectionReceiver
.AOutputStreamConnectionShortsTransmitter
is aDatagramTransmitter
connected through I/O streams with aInputStreamConnectionReceiver
.OutputStreamDatagramsTransmitter<DATA extends Serializable>The Class OutputStreamDatagramsTransmitter.The Class OutputStreamShortsTransmitter.The Class PrefetchBidirectionalStreamByteTransceiver.The Class PrefetchBidirectionalStreamConnectionByteTransceiver.PrefetchBidirectionalStreamConnectionTransceiver<DATA extends Serializable>The Class PrefetchBidirectionalStreamConnectionTransceiver.PrefetchBidirectionalStreamTransceiver<DATA extends Serializable>The Class PrefetchBidirectionalStreamTransceiver.The Class PrefetchInputStreamByteReceiver.Implementation of theInputStreamConnectionReceiver
interface.PrefetchInputStreamConnectionReceiver<DATA extends Serializable>Implementation of theInputStreamConnectionReceiver
interface.PrefetchInputStreamReceiver<DATA extends Serializable>The Class PrefetchInputStreamReceiver.The Interface Receivable.TheReplaceInputStream
replaces a give byte sequence with another given bytes sequence.TheReplayInputStream
wraps anInputStream
addingReplayInputStream.mark(int)
,ReplayInputStream.markSupported()
as well asReplayInputStream.reset()
functionality, similar to theBufferedInputStream
.RowReader<T>ARowReader
reads a set of elements (a row) from an external source.RowWriter<T>ARowWriter
writes a set of elements (a row) to an external destination.Makes the wrappedIterator
serializable, else passingIterator
instances would cause anNotSerializableException
or similar.Makes the wrappedListIterator
serializable, else passingListIterator
instances would cause anNotSerializableException
or similar.TheSerializableObjectInputStream
extends an ordinaryObjectInputStream
to also resolve primitive types.The Class ShortArrayReceiver.The Class ShortArraySource.TheShortDestination
is used to receive shorts in a unified way.TheShortReceiver
is used to receive shot values in a unified way.TheShortsDestination
is used to receive short blocks (arrays) in a unified way.TheShortSource
is used to send shorts in a unified way.The Interface ShortsReceiver.TheShortsReceiverDecorator
decorates aShortsDestination
with the additional methods of aShortsReceiver
making it easy to use aShortsDestination
wherever aShortsReceiver
is expected.TheShortsSource
is used to send short blocks (arrays) in a unified way.AShortsTransceiver
combines the functionality of aShortsTransmitter
and of aShortsReceiver
. e.g. for building loopback devices.TheShortsTransmitter
is used to send short blocks (arrays) in a unified way.Combines theShortTransmitter
andShortReceiver
functionality in a single interface to be implemented by a single class so thatShortsTransmitter
andShortReceiver
functionality can be provided by a single instance.The Interface ShortsTransmitter.TheShortTransmitterDecorator
decorates aShortsSource
with the additional methods of aShortsTransmitter
making it easy to use aShortsSource
wherever aShortsTransmitter
is expected.TheSkipAvailableInputStream
decorates anInputStream
with skip timed functionality, e.g. skip all currently available bytes (Skippable.skipAvailable()
), all bytes available for a period of time (SkipAvailableInputStream.skipAvailableWithin(long)
) or skip all bytes available till a send pause of a given time is detected (SkipAvailableInputStream.skipAvailableTillSilenceFor(long)
orSkippable.skipAvailableTillSilenceFor(long, long)
).TheSkippable
interface defines methods useful for omitting bytes known to be unusable for the according operation.TheTimeoutInputStream
decorates anInputStream
with time-out functionality usingCompletableFuture
functionality.Provides an accessor for an timeout input stream property.TimeoutInputStreamAccessor.TimeoutInputStreamBuilder<B extends TimeoutInputStreamAccessor.TimeoutInputStreamBuilder<?>>Provides a mutator for an timeout input stream property.Provides a mutator for an timeout input stream property.Provides an timeout input stream property.The Interface Transmittable.TransmitterDecorator<DATA extends Serializable>TheTransmitterDecorator
decorates aDatagramsSource
with the additional methods of aDatagramsTransmitter
making it easy to use aDatagramsSource
wherever aDatagramsTransmitter
is expected.Represents anInputStream
from a providedFile
: In case the file points to a ZIP compressed file, then the uncompressed data of the therein contained file with the same name excluding the ".zip" extension is provided by theInputStream
.Represents anOutputStream
to a providedFile
: In case the file points to a ZIP compressed file, then a therein to be contained file with the same name excluding the ".zip" extension is created by theOutputStream
.Utility class for some ZIP compression related issues.