com.github.akurilov.commons.io.Output Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of java-commons Show documentation
Show all versions of java-commons Show documentation
Common functionality Java library
The newest version!
package com.github.akurilov.commons.io;
import java.util.List;
import java.util.function.Consumer;
/**
* The Java objects output supporting the batch calls
*/
public interface Output
extends AutoCloseable, Consumer {
@Override
default void accept(final I item) {
put(item);
}
/**
Write the data item
@param item the item to put
@throws java.io.IOException if fails some-why
*/
boolean put(final I item);
/**
Bulk put method for the items from the specified buffer
@param buffer the buffer containing the items to put
@return the count of the items successfully written
@throws java.io.IOException
*/
int put(final List buffer, final int from, final int to);
int put(final List buffer);
/**
Make a {@link Input} instance from this.
@return {@link Input} instance containing the items which had been written to this output.
@throws java.io.IOException
*/
Input getInput();
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy