Package org.ojalgo.netio
Interface FromFileReader<T>
-
- All Superinterfaces:
java.lang.AutoCloseable
,AutoFunctional
,AutoSupplier<T>
,java.io.Closeable
,java.lang.Iterable<T>
,java.util.function.Supplier<T>
- All Known Implementing Classes:
DataReader
,TextLineReader
public interface FromFileReader<T> extends AutoSupplier<T>, java.io.Closeable
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
FromFileReader.Builder
-
Method Summary
All Methods Static Methods Instance Methods Default Methods Modifier and Type Method Description default void
close()
static void
copy(java.io.File sourceFile, java.util.Properties destinationMap)
Read the properties file and copy the entries to the supplied destinationProperties
instance.static void
delete(java.io.File file)
Delete this file or directory (does not need to be empty).static <T extends java.io.Serializable>
TdeserializeObjectFromFile(java.io.File file)
static java.io.InputStream
input(java.io.File file)
static java.io.InputStream
input(java.io.File file, OperatorWithException<java.io.InputStream> filter)
static FromFileReader.Builder
newBuilder(java.io.File... file)
static FromFileReader.Builder
newBuilder(ShardedFile shards)
static <S,T>
java.util.function.Supplier<AutoSupplier<T>>newFactory(java.util.function.Function<S,FromFileReader<T>> factory, java.util.Collection<? extends S> sources)
A factory that produce readers that read items from the supplied sources.static <S,T>
java.util.function.Supplier<AutoSupplier<T>>newFactory(java.util.function.Function<S,FromFileReader<T>> factory, S... sources)
-
Methods inherited from interface org.ojalgo.type.function.AutoSupplier
drainTo, get, iterator, processAll, read
-
-
-
-
Method Detail
-
copy
static void copy(java.io.File sourceFile, java.util.Properties destinationMap)
Read the properties file and copy the entries to the supplied destinationProperties
instance.- Parameters:
sourceFile
- Source properties filedestinationMap
- Destination properties map
-
delete
static void delete(java.io.File file)
Delete this file or directory (does not need to be empty).- Parameters:
file
- Path to a file or directory to be deleted
-
deserializeObjectFromFile
static <T extends java.io.Serializable> T deserializeObjectFromFile(java.io.File file)
-
input
static java.io.InputStream input(java.io.File file)
-
input
static java.io.InputStream input(java.io.File file, OperatorWithException<java.io.InputStream> filter)
-
newBuilder
static FromFileReader.Builder newBuilder(java.io.File... file)
-
newBuilder
static FromFileReader.Builder newBuilder(ShardedFile shards)
-
newFactory
static <S,T> java.util.function.Supplier<AutoSupplier<T>> newFactory(java.util.function.Function<S,FromFileReader<T>> factory, java.util.Collection<? extends S> sources)
A factory that produce readers that read items from the supplied sources. (You have a collection of files and want to read through them all using 1 or more readers.)
-
newFactory
static <S,T> java.util.function.Supplier<AutoSupplier<T>> newFactory(java.util.function.Function<S,FromFileReader<T>> factory, S... sources)
-
close
default void close() throws java.io.IOException
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfaceAutoSupplier<T>
- Specified by:
close
in interfacejava.io.Closeable
- Throws:
java.io.IOException
-
-