Package com.wavemaker.commons.io.store
Interface FileStore
-
- All Superinterfaces:
ResourceStore
public interface FileStore extends ResourceStore
Store for a singleFile.- See Also:
StoredFile
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.io.InputStreamgetInputStream()Access the file content as an input stream.longgetLastModified()Return the date/time that the file was last modified.java.io.OutputStreamgetOutputStream()Access the file content as an output stream.java.io.OutputStreamgetOutputStream(boolean append)longgetSize()Return the size of the file.voidtouch()Touch the file to update thegetLastModified()date.
-
-
-
Method Detail
-
getInputStream
java.io.InputStream getInputStream()
Access the file content as an input stream.- Returns:
- an input stream to read content
-
getOutputStream
java.io.OutputStream getOutputStream()
Access the file content as an output stream.- Returns:
- an output stream to write content
-
getOutputStream
java.io.OutputStream getOutputStream(boolean append)
- Parameters:
append- iftrue, open the file OutputStream in append mode, otherwise as new file Access the file content as an output stream.- Returns:
- an output stream to write content
-
getSize
long getSize()
Return the size of the file.- Returns:
- the file size
-
getLastModified
long getLastModified()
Return the date/time that the file was last modified.- Returns:
- the last modified timestamp
-
touch
void touch()
Touch the file to update thegetLastModified()date.
-
-