public class SnapData
extends java.lang.Object
Constructor and Description |
---|
SnapData() |
Modifier and Type | Method and Description |
---|---|
protected byte[] |
createBytes()
Creates the bytes.
|
protected WebURL |
createSourceURL()
Creates the source URL from source if possible.
|
void |
delete()
Override to delete entity.
|
static <T extends SnapData> |
get(WebFile aFile,
java.lang.Class<T> aClass)
Returns the data for given file as given SnapData subclass.
|
byte[] |
getBytes()
Returns the bytes.
|
java.io.InputStream |
getInputStream()
Returns an input stream for the data.
|
WebSite |
getSite()
Returns the site for this data.
|
java.lang.Object |
getSource()
Returns the source.
|
WebFile |
getSourceFile()
Returns the source file.
|
WebURL |
getSourceURL()
Returns the source URL.
|
static boolean |
is(WebFile aFile,
java.lang.Class aClass)
Returns whether given file is of given data type.
|
void |
refresh()
Reverts file.
|
void |
save()
Saves the file.
|
void |
setBytes(byte[] theBytes)
Sets the bytes.
|
void |
setSource(java.lang.Object aSource)
Sets the source.
|
public java.lang.Object getSource()
public void setSource(java.lang.Object aSource)
public WebURL getSourceURL()
protected WebURL createSourceURL()
public WebFile getSourceFile()
public WebSite getSite()
public byte[] getBytes()
protected byte[] createBytes()
public void setBytes(byte[] theBytes)
public java.io.InputStream getInputStream()
public void save() throws java.lang.Exception
java.lang.Exception
public void delete() throws java.lang.Exception
java.lang.Exception
public void refresh()
public static boolean is(WebFile aFile, java.lang.Class aClass)