public class FileHandler extends java.lang.Object
Constructor and Description |
---|
FileHandler() |
Modifier and Type | Method and Description |
---|---|
boolean |
delete(java.lang.String filePath) |
java.lang.String |
generateFilename(java.lang.String filename)
helper method for generating a new file name based on the given original filename.
|
boolean |
save(java.lang.String filePath,
java.io.InputStream file)
Saves the content of the input stream to the given path using the given filename
|
public FileHandler()
public boolean save(java.lang.String filePath, java.io.InputStream file)
filePath
- absolute file path of the file to be createdfile
- the inputstream containing the file, the stream will NOT be closedpublic boolean delete(java.lang.String filePath)
filePath
- the absolute file path of the file to be deletedpublic java.lang.String generateFilename(java.lang.String filename)
filename
- Copyright © 2015 Tampere University of Technology, Pori Department.