Class SnapData
java.lang.Object
com.inductiveautomation.snap.filedata.SnapData
- Direct Known Subclasses:
- ClassData,- HTMLData,- JavaData,- MidiData,- ReportData,- TableData,- TableViewData
Represents the data (from a file)
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected byte[]Creates the bytes.protected WebURLCreates the source URL from source if possible.voiddelete()Override to delete entity.static <T extends SnapData>
 TReturns the data for given file as given SnapData subclass.byte[]getBytes()Returns the bytes.Returns an input stream for the data.getSite()Returns the site for this data.Returns the source.Returns the source file.Returns the source URL.static booleanReturns whether given file is of given data type.voidrefresh()Reverts file.voidsave()Saves the file.voidsetBytes(byte[] theBytes) Sets the bytes.voidSets the source.
- 
Constructor Details- 
SnapDatapublic SnapData()
 
- 
- 
Method Details- 
getSourceReturns the source.
- 
setSourceSets the source.
- 
getSourceURLReturns the source URL.
- 
createSourceURLCreates the source URL from source if possible.
- 
getSourceFileReturns the source file.
- 
getSiteReturns 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.
- 
getInputStreamReturns an input stream for the data.
- 
saveSaves the file.- Throws:
- Exception
 
- 
deleteOverride to delete entity.- Throws:
- Exception
 
- 
refreshpublic void refresh()Reverts file.
- 
isReturns whether given file is of given data type.
- 
getReturns the data for given file as given SnapData subclass.
 
-