All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.powerlibraries.io.functions.ReaderWrapper Maven / Gradle / Ivy

Go to download

Power Libraries is a small project to collect some repeatedly needed or otherwise useful Java 8 classes in a collection of tiny libraries. IO Power is the first and really tiny library of the Power Libraries. It contains some simple helper method for opening Input- and Outputstreams. The main purpose of IO Power is to make opening streams, readers and writers less cluttered and simple to understand.

There is a newer version: 1.1.3
Show newest version
package com.github.powerlibraries.io.functions;

import java.io.IOException;
import java.io.Reader;

/**This class is a simple functional interface used to wrap a Reader with another. Instead of implementing this 
 * interface it is often enough to use a constructor, e.g. BufferedReader::new.
 * 
 * @author Manuel Hegner
 */
@FunctionalInterface
public interface ReaderWrapper {
	
	/**
	 * This method should wrap the given Reader with another Reader.
	 * @param out the Reader given
	 * @return a wrapped Reader
	 * @throws IOException thrown by some OutputStream constructors
	 */
	public Reader wrap(Reader out) throws IOException;
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy