personthecat.catlib.io.InputStreamProvider Maven / Gradle / Ivy
package personthecat.catlib.io;
import personthecat.fresult.functions.ThrowingSupplier;
import java.io.IOException;
import java.io.InputStream;
public class InputStreamProvider {
private final String name;
private final ThrowingSupplier is;
public InputStreamProvider(final String name, final ThrowingSupplier is) {
this.name = name;
this.is = is;
}
public String getName() {
return this.name;
}
public InputStream getStream() throws IOException {
return this.is.get();
}
public InputStreamProvider rename(final String name) {
return new InputStreamProvider(name, this.is);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy