Package com.gengoai.io.resource
Interface WriteOnlyResource
-
- All Superinterfaces:
Resource
- All Known Implementing Classes:
OutputStreamResource
,StdoutResource
,WriterResource
public interface WriteOnlyResource extends Resource
Defines a resources as being write only- Author:
- David B. Bracewell
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.gengoai.io.resource.Resource
Resource.Deserializer
-
-
Field Summary
-
Fields inherited from interface com.gengoai.io.resource.Resource
ALL_FILE_PATTERN
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default boolean
canRead()
Returnstrue
if the resource is readable,false
if not.default boolean
canWrite()
Returnstrue
if the resource is writable,false
if not.default MStream<String>
lines()
Creates anMStream
over the lines in the resource.-
Methods inherited from interface com.gengoai.io.resource.Resource
append, append, asFile, asPath, asURI, asURL, baseName, childIterator, childIterator, compressed, copy, delete, delete, deleteOnExit, descriptor, exists, forEach, getCharset, getChild, getChildren, getChildren, getChildren, getChildren, getChildren, getParent, inputStream, isCompressed, isDirectory, mkdir, mkdirs, outputStream, path, readBytes, reader, readLines, readObject, readToString, setCharset, setCompression, setIsCompressed, uncompressed, write, write, writeObject, writer
-
-
-
-
Method Detail
-
canRead
default boolean canRead()
Description copied from interface:Resource
Returnstrue
if the resource is readable,false
if not.
-
canWrite
default boolean canWrite()
Description copied from interface:Resource
Returnstrue
if the resource is writable,false
if not.
-
lines
default MStream<String> lines() throws IOException
Description copied from interface:Resource
Creates anMStream
over the lines in the resource.- Specified by:
lines
in interfaceResource
- Returns:
- the stream of lines
- Throws:
IOException
- Something went wrong reading from the resource
-
-