Package dev.enola.common.io.object.csv
Class CsvReader
java.lang.Object
dev.enola.common.io.object.csv.CsvReader
- All Implemented Interfaces:
ObjectReader
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T> Optional<T> optional(ReadableResource resource, Class<T> type) Read an object of Class T from the resource, if present.<T> CloseableIterable<T> readArray(ReadableResource resource, Class<T> type) Deprecated.<T> CloseableIterable<T> readStream(ReadableResource resource, Class<T> type) Read e.g.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface dev.enola.common.io.object.ObjectReader
read
-
Constructor Details
-
CsvReader
-
CsvReader
public CsvReader()
-
-
Method Details
-
optional
Description copied from interface:ObjectReaderRead an object of Class T from the resource, if present.- Specified by:
optionalin interfaceObjectReader- Throws:
IOException
-
readArray
@Deprecated public <T> CloseableIterable<T> readArray(ReadableResource resource, Class<T> type) throws IOException Deprecated.Description copied from interface:ObjectReaderRead e.g. a JSON (or YAML) [ ... ] array.- Specified by:
readArrayin interfaceObjectReader- Throws:
IOException
-
readStream
public <T> CloseableIterable<T> readStream(ReadableResource resource, Class<T> type) throws IOException Description copied from interface:ObjectReaderRead e.g. a YAML stream. (For formats such as plain JSON which do not directly support a streams syntax, this will always return a single element.)- Specified by:
readStreamin interfaceObjectReader- Throws:
IOException
-