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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected byte[]
Creates the bytes.protected WebURL
Creates the source URL from source if possible.void
delete()
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 boolean
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
Sets the source.
-
Constructor Details
-
SnapData
public SnapData()
-
-
Method Details
-
getSource
Returns the source. -
setSource
Sets the source. -
getSourceURL
Returns the source URL. -
createSourceURL
Creates the source URL from source if possible. -
getSourceFile
Returns the source file. -
getSite
Returns the site for this data. -
getBytes
public byte[] getBytes()Returns the bytes. -
createBytes
protected byte[] createBytes()Creates the bytes. -
setBytes
public void setBytes(byte[] theBytes) Sets the bytes. -
getInputStream
Returns an input stream for the data. -
save
Saves the file.- Throws:
Exception
-
delete
Override to delete entity.- Throws:
Exception
-
refresh
public void refresh()Reverts file. -
is
Returns whether given file is of given data type. -
get
Returns the data for given file as given SnapData subclass.
-