Package io.mateu.mdd.core.model.common
Class Resource
- java.lang.Object
-
- io.mateu.mdd.core.model.common.Resource
-
- All Implemented Interfaces:
io.mateu.mdd.shared.interfaces.IResource
public class Resource extends Object implements io.mateu.mdd.shared.interfaces.IResource
Created by miguel on 27/3/17.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddowload(URL url)byte[]getBytes()voidset(String url)voidset(String fileName, String tmpPath)io.mateu.util.data.FileLocatortoFileLocator()StringtoString()
-
-
-
Constructor Detail
-
Resource
public Resource()
-
Resource
public Resource(String name, InputStream stream) throws FileNotFoundException
- Throws:
FileNotFoundException
-
Resource
public Resource(File file) throws FileNotFoundException
- Throws:
FileNotFoundException
-
Resource
public Resource(URL url)
-
-
Method Detail
-
getBytes
public byte[] getBytes()
- Specified by:
getBytesin interfaceio.mateu.mdd.shared.interfaces.IResource
-
toFileLocator
public io.mateu.util.data.FileLocator toFileLocator() throws Exception- Specified by:
toFileLocatorin interfaceio.mateu.mdd.shared.interfaces.IResource- Throws:
Exception
-
set
public void set(String fileName, String tmpPath) throws Exception
- Specified by:
setin interfaceio.mateu.mdd.shared.interfaces.IResource- Throws:
Exception
-
set
public void set(String url) throws Exception
- Specified by:
setin interfaceio.mateu.mdd.shared.interfaces.IResource- Throws:
Exception
-
-