| Package | Description |
|---|---|
| net.lecousin.framework.concurrent.tasks |
Implementations of tasks.
|
| net.lecousin.framework.io |
New java Input/Output model adding more flexibility and asynchronous operations.
|
| net.lecousin.framework.io.buffering |
IO with bufferization.
|
| net.lecousin.framework.io.encoding |
Utility classes for encoding.
|
| net.lecousin.framework.io.out2in |
Implementations of IO.OutputToInput.
|
| net.lecousin.framework.io.provider |
Providers of IO (allow to open IO on demand).
|
| net.lecousin.framework.io.serialization |
Serialization and deserialization framework.
|
| net.lecousin.framework.io.text |
IO on characters and text.
|
| net.lecousin.framework.io.util |
Utility classes for IO.
|
| net.lecousin.framework.util |
Utility classes.
|
| net.lecousin.framework.xml.serialization |
XML serialization and deserialization.
|
| Modifier and Type | Method and Description |
|---|---|
static IAsync<IOException> |
SavePropertiesFileTask.savePropertiesFile(Properties properties,
IO.Writable output,
Charset charset,
byte priority,
boolean closeIOAtEnd)
Save properties to a Writable IO.
|
| Modifier and Type | Interface and Description |
|---|---|
static interface |
IO.OutputToInput
An OutputToInput is an IO on which a producer is writing, and a consumer is reading.
The producer receive it as a Writable, and the consumer as a Readable. Both can work concurrently: as soon as data is written by the producer, it can be read by the consumer. The producer must call the method endOfData or signalErrorBeforeEndOfData, so the consumer can receive the information it reaches the end of the IO. The implementations may add additional capabilities such as Readable.Seekable if it keeps the data. |
static interface |
IO.Writable.Buffered
Add a flush operation to force writing on the underlying IO.
|
static interface |
IO.Writable.Seekable
Add operations to write at a specific position.
|
| Modifier and Type | Class and Description |
|---|---|
static class |
FileIO.ReadWrite
FileIO with read and write operations.
|
static class |
FileIO.WriteOnly
FileIO in write-only mode.
|
static class |
FragmentedSubIO.ReadWrite
Readable and Writable fragmented IO.
|
class |
IOFromOutputStream
Implements Writable from an OutputStream.
|
static class |
LinkedIO.ReadWrite
Linked Readable and Writable IO.
|
static class |
SubIO.ReadWrite
Sub-part of a Seekable Readable and Writable IO.
|
static class |
SubIO.Writable
Sub-part of a Writable IO.
|
static class |
SubIO.Writable.Seekable
Sub-part of a Seekable Writable IO.
|
| Modifier and Type | Method and Description |
|---|---|
abstract IO.Writable |
IOAsOutputStream.getWrappedIO()
Return the underlying IO.Writable.
|
IO.Writable |
IOAsOutputStream.Writable.getWrappedIO() |
IO.Writable |
IOAsOutputStream.ByteStream.getWrappedIO() |
| Modifier and Type | Method and Description |
|---|---|
static AsyncSupplier<Long,IOException> |
IOUtil.copy(IO.Readable input,
IO.Writable output,
long size,
boolean closeIOs,
WorkProgress progress,
long work)
Copy from a Readable to a Writable.
|
static OutputStream |
IOAsOutputStream.get(IO.Writable io)
Create an OutputStream based on the given writable IO.
|
static Task<Integer,IOException> |
IOUtil.writeAsyncUsingSync(IO.Writable io,
ByteBuffer buffer,
Consumer<Pair<Integer,IOException>> ondone)
Implement an asynchronous write using a task calling a synchronous write.
|
static int |
IOUtil.writeSyncUsingAsync(IO.Writable io,
ByteBuffer buffer)
Implement a synchronous write using an asynchronous one and blocking until it finishes.
|
| Constructor and Description |
|---|
IOWritePool(IO.Writable io)
Constructor.
|
Writable(IO.Writable io)
Constructor.
|
Writable(IO.Writable src,
long start,
long size,
String description,
boolean closeSrcOnClose)
Constructor.
|
| Modifier and Type | Class and Description |
|---|---|
static class |
BufferedIO.ReadWrite
Writable BufferedIO.
|
class |
ByteArrayIO
IO implemented with a single byte array.
|
class |
ByteBuffersIO
Implementation of IO using a list of byte array.
|
class |
IOInMemoryOrFile
Store data first in memory, then if exceeding a given amount of memory, store the remaining
data in a file.
This can be used when the amount of data is not known, and we want to keep good performance with small data (all in memory), but do not allocate too much memory when having large data. A typical usage is when a server is receiving an uploaded file, and the size is not known in advance. This IO is writable and readable: the written data are readable. |
class |
MemoryIO
Implementation of a seekable readable and writable IO, using an array of byte array.
|
class |
SimpleBufferedWritable
Simple implementation of a buffered writable using 2 buffers.
The first buffer is first filled with written data. |
| Modifier and Type | Method and Description |
|---|---|
Async<IOException> |
MemoryIO.writeAsyncTo(IO.Writable io)
Asynchronously write the content of this MemoryIO into the given Writable.
|
| Constructor and Description |
|---|
SimpleBufferedWritable(IO.Writable out,
int bufferSize)
Constructor.
|
| Constructor and Description |
|---|
Base64Decoder(IO.Writable output)
Constructor.
|
| Modifier and Type | Class and Description |
|---|---|
class |
OutputToInput
Implementation of IO.OutputToInput using the given IO.
|
class |
OutputToInputBuffers
Implementation of IO.OutputToInput using a list of ByteBuffer, that are stored in memory while
writing, and removed while reading them.
Optionally a maximum number of pending buffers can be specified. |
| Modifier and Type | Method and Description |
|---|---|
<T extends IO.Readable & IO.Writable> |
IOProvider.ReadWrite.provideIOReadWrite(byte priority)
Provider a IO Readable and Writable.
|
default <T extends IO.Readable & IO.Writable> |
IOProvider.ReadWrite.KnownSize.provideIOReadWrite(byte priority) |
default <T extends IO.Readable & IO.Writable> |
IOProvider.ReadWrite.Seekable.provideIOReadWrite(byte priority) |
default <T extends IO.Readable & IO.Writable> |
IOProvider.ReadWrite.Seekable.KnownSize.provideIOReadWrite(byte priority) |
<T extends IO.Readable & IO.Writable & IO.KnownSize> |
IOProvider.ReadWrite.KnownSize.provideIOReadWriteKnownSize(byte priority) |
default <T extends IO.Readable & IO.Writable & IO.KnownSize> |
IOProvider.ReadWrite.KnownSize.Resizable.provideIOReadWriteKnownSize(byte priority) |
default <T extends IO.Readable & IO.Writable & IO.KnownSize> |
IOProvider.ReadWrite.Seekable.KnownSize.provideIOReadWriteKnownSize(byte priority) |
default <T extends IO.Readable & IO.Writable & IO.KnownSize> |
IOProvider.ReadWrite.Seekable.KnownSize.Resizable.provideIOReadWriteKnownSize(byte priority) |
<T extends IO.Readable & IO.Writable & IO.Resizable> |
IOProvider.ReadWrite.KnownSize.Resizable.provideIOReadWriteResizable(byte priority) |
default <T extends IO.Readable & IO.Writable & IO.Resizable> |
IOProvider.ReadWrite.Seekable.KnownSize.Resizable.provideIOReadWriteResizable(byte priority) |
<T extends IO.Writable & IO.KnownSize> |
IOProvider.Writable.KnownSize.provideIOWritableKnownSize(byte priority)
Provide a IO.Writable with IO.KnownSize.
|
default <T extends IO.Writable & IO.KnownSize> |
IOProvider.Writable.KnownSize.Resizable.provideIOWritableKnownSize(byte priority) |
default <T extends IO.Writable & IO.KnownSize> |
IOProvider.Writable.Seekable.KnownSize.provideIOWritableKnownSize(byte priority) |
default <T extends IO.Writable & IO.KnownSize> |
IOProvider.Writable.Seekable.KnownSize.Resizable.provideIOWritableKnownSize(byte priority) |
default <T extends IO.Writable & IO.KnownSize> |
IOProvider.ReadWrite.KnownSize.provideIOWritableKnownSize(byte priority) |
default <T extends IO.Writable & IO.KnownSize> |
IOProvider.ReadWrite.KnownSize.Resizable.provideIOWritableKnownSize(byte priority) |
default <T extends IO.Writable & IO.KnownSize> |
IOProvider.ReadWrite.Seekable.KnownSize.provideIOWritableKnownSize(byte priority) |
default <T extends IO.Writable & IO.KnownSize> |
IOProvider.ReadWrite.Seekable.KnownSize.Resizable.provideIOWritableKnownSize(byte priority) |
<T extends IO.Writable & IO.Resizable> |
IOProvider.Writable.KnownSize.Resizable.provideIOWritableResizable(byte priority)
Provide a IO.Writable with Resizable.
|
default <T extends IO.Writable & IO.Resizable> |
IOProvider.Writable.Seekable.KnownSize.Resizable.provideIOWritableResizable(byte priority) |
| Modifier and Type | Method and Description |
|---|---|
IO.Writable |
IOProvider.Writable.provideIOWritable(byte priority)
Provide a IO.Writable.
|
default IO.Writable |
IOProvider.Writable.KnownSize.provideIOWritable(byte priority) |
default IO.Writable |
IOProvider.Writable.Seekable.provideIOWritable(byte priority) |
default IO.Writable |
IOProvider.Writable.Seekable.KnownSize.provideIOWritable(byte priority) |
default IO.Writable |
IOProvider.ReadWrite.provideIOWritable(byte priority) |
default IO.Writable |
IOProvider.ReadWrite.KnownSize.provideIOWritable(byte priority) |
default IO.Writable |
IOProvider.ReadWrite.Seekable.provideIOWritable(byte priority) |
default IO.Writable |
IOProvider.ReadWrite.Seekable.KnownSize.provideIOWritable(byte priority) |
| Constructor and Description |
|---|
BufferedWritableCharacterStream(IO.Writable output,
CharsetEncoder encoder,
int bufferSize)
Constructor.
|
BufferedWritableCharacterStream(IO.Writable output,
Charset charset,
int bufferSize)
Constructor.
|
WritableCharacterStream(IO.Writable output,
Charset charset)
Constructor.
|
WritableCharacterStream(IO.Writable output,
CharsetEncoder encoder)
Constructor.
|
| Modifier and Type | Class and Description |
|---|---|
class |
BroadcastIO
Aggregation of several IOs, every write is performed on all IOs.
|
| Constructor and Description |
|---|
BroadcastIO(IO.Writable[] ios,
byte priority,
boolean closeIOs)
Constructor.
|
LimitWriteOperations(IO.Writable io,
int maxOperations)
Constructor.
|
LimitWriteOperationsReuseBuffers(IO.Writable io,
int bufferSize,
int maxOperations)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
Async<IOException> |
UnprotectedStringBuffer.encode(Charset charset,
IO.Writable output,
byte priority)
Encode this string with the given charset and write the result on the given writable IO.
|
| Modifier and Type | Method and Description |
|---|---|
protected IAsync<SerializationException> |
XMLSerializer.initializeSerialization(IO.Writable output) |
protected IAsync<SerializationException> |
XMLSpecWriter.initializeSpecWriter(IO.Writable output) |
Copyright © 2019. All rights reserved.