Package com.gengoai.io.resource
Interface ReadOnlyResource
-
- All Superinterfaces:
Resource
- All Known Implementing Classes:
InputStreamResource
,ReaderResource
,StdinResource
,ZipResource
public interface ReadOnlyResource extends Resource
Defines a resource as being Read 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 Resource
append(byte[] byteArray)
Appends the given byte array content to the resource.default boolean
canRead()
Returnstrue
if the resource is readable,false
if not.default boolean
canWrite()
Returnstrue
if the resource is writable,false
if not.-
Methods inherited from interface com.gengoai.io.resource.Resource
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, lines, mkdir, mkdirs, outputStream, path, readBytes, reader, readLines, readObject, readToString, setCharset, setCompression, setIsCompressed, uncompressed, write, write, writeObject, writer
-
-
-
-
Method Detail
-
canWrite
default boolean canWrite()
Description copied from interface:Resource
Returnstrue
if the resource is writable,false
if not.
-
canRead
default boolean canRead()
Description copied from interface:Resource
Returnstrue
if the resource is readable,false
if not.
-
append
default Resource append(byte[] byteArray) throws IOException
Description copied from interface:Resource
Appends the given byte array content to the resource.
- Specified by:
append
in interfaceResource
- Parameters:
byteArray
- The content to append- Returns:
- the resource
- Throws:
IOException
- the io exception
-
-