Class SnapData
- java.lang.Object
- 
- com.inductiveautomation.snap.filedata.SnapData
 
- 
- Direct Known Subclasses:
- ClassData,- HTMLData,- JavaData,- MidiData,- ReportData,- TableData,- TableViewData
 
 public class SnapData extends java.lang.ObjectRepresents the data (from a file)
- 
- 
Constructor SummaryConstructors Constructor Description SnapData()
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected byte[]createBytes()Creates the bytes.protected WebURLcreateSourceURL()Creates the source URL from source if possible.voiddelete()Override to delete entity.static <T extends SnapData>
 Tget(WebFile aFile, java.lang.Class<T> aClass)Returns the data for given file as given SnapData subclass.byte[]getBytes()Returns the bytes.java.io.InputStreamgetInputStream()Returns an input stream for the data.WebSitegetSite()Returns the site for this data.java.lang.ObjectgetSource()Returns the source.WebFilegetSourceFile()Returns the source file.WebURLgetSourceURL()Returns the source URL.static booleanis(WebFile aFile, java.lang.Class aClass)Returns whether given file is of given data type.voidrefresh()Reverts file.voidsave()Saves the file.voidsetBytes(byte[] theBytes)Sets the bytes.voidsetSource(java.lang.Object aSource)Sets the source.
 
- 
- 
- 
Method Detail- 
getSourcepublic java.lang.Object getSource() Returns the source.
 - 
setSourcepublic void setSource(java.lang.Object aSource) Sets the source.
 - 
getSourceURLpublic WebURL getSourceURL() Returns the source URL.
 - 
createSourceURLprotected WebURL createSourceURL() Creates the source URL from source if possible.
 - 
getSourceFilepublic WebFile getSourceFile() Returns the source file.
 - 
getSitepublic WebSite getSite() Returns the site for this data.
 - 
getBytespublic byte[] getBytes() Returns the bytes.
 - 
createBytesprotected byte[] createBytes() Creates the bytes.
 - 
setBytespublic void setBytes(byte[] theBytes) Sets the bytes.
 - 
getInputStreampublic java.io.InputStream getInputStream() Returns an input stream for the data.
 - 
savepublic void save() throws java.lang.ExceptionSaves the file.- Throws:
- java.lang.Exception
 
 - 
deletepublic void delete() throws java.lang.ExceptionOverride to delete entity.- Throws:
- java.lang.Exception
 
 - 
refreshpublic void refresh() Reverts file.
 - 
ispublic static boolean is(WebFile aFile, java.lang.Class aClass) Returns whether given file is of given data type.
 
- 
 
-