Package org.graffiti.plugin.io.resources
Class FileSystemHandler
java.lang.Object
org.graffiti.plugin.io.resources.AbstractResourceIOHandler
org.graffiti.plugin.io.resources.FileSystemHandler
- All Implemented Interfaces:
ResourceIOHandler
public class FileSystemHandler extends AbstractResourceIOHandler
-
Field Summary
-
Constructor Summary
Constructors Constructor Description FileSystemHandler()
-
Method Summary
Modifier and Type Method Description IOurl
copyDataAndReplaceURLPrefix(InputStream is, String targetFilename, ResourceIOConfigObject config)
static File
getFile(IOurl url)
InputStream
getInputStream(IOurl url)
String
getPrefix()
static IOurl
getURL(File file)
static boolean
isFileUrl(IOurl url)
IOurl
saveAs(IOurl source, String targetFilename)
Methods inherited from class org.graffiti.plugin.io.resources.AbstractResourceIOHandler
save
-
Field Details
-
PREFIX
- See Also:
- Constant Field Values
-
-
Constructor Details
-
FileSystemHandler
public FileSystemHandler()
-
-
Method Details
-
getPrefix
-
getInputStream
- Throws:
Exception
-
getFile
-
isFileUrl
-
copyDataAndReplaceURLPrefix
public IOurl copyDataAndReplaceURLPrefix(InputStream is, String targetFilename, ResourceIOConfigObject config) throws Exception- Returns:
- new url, or null, if not copied
- Throws:
Exception
- if something went wrong during copying
-
getURL
-
saveAs
- Specified by:
saveAs
in interfaceResourceIOHandler
- Overrides:
saveAs
in classAbstractResourceIOHandler
- Throws:
Exception
-