PluginFile

public class PluginFile

A PluginFile represents an archive file containing all the plugin required files, including the plugin descriptor.

Author:Hugo Y. K. Lam

Fields

DEFAULT_FILE_EXT

public static final String DEFAULT_FILE_EXT

The default file extension (spa) of the plugin file.

Constructors

PluginFile

public PluginFile(File pluginFile)

Create a new instance of PluginFile.

Parameters:
  • pluginFile – the plugin file.
Throws:
  • PluginException – if unable to create the plugin file instance.

PluginFile

public PluginFile(File pluginFile, String descriptorName)

Create a new instance of PluginFile.

Parameters:
  • pluginFile – the plugin file.
  • descriptorName – the plugin descriptor name.
Throws:
  • PluginException – if unable to create the plugin file instance.

PluginFile

public PluginFile(InputStream pluginStream)

Create a new instance of PluginFile.

Parameters:
  • pluginStream – the plugin stream.
Throws:
  • PluginException – if unable to create the plugin file instance.

PluginFile

public PluginFile(InputStream pluginStream, String descriptorName)

Create a new instance of PluginFile.

Parameters:
  • pluginStream – the plugin stream.
  • descriptorName – the plugin descriptor name.
Throws:
  • PluginException – if unable to create the plugin file instance.

Methods

getDescriptor

public PluginDescriptor getDescriptor()

Gets the plugin descriptor.

Returns:the plugin descriptor.

getPluginContent

public byte[] getPluginContent()

Gets the plugin content.

Returns:the plugin content.