return new ByteArrayOutputStream() {
@Override
public void close() throws IOException {
super.close();
final byte[] bytes = toByteArray();
PluginManager pluginManager = ProcessToolContext.Util.getThreadProcessToolContext().getRegistry().getPluginManager();
pluginManager.registerPlugin(filename,
new ByteArrayInputStream(bytes));
displayBundleList();
String msg = getLocalizedMessage("plugins.console.upload.success");
Window.Notification n = new Window.Notification(msg);
n.setDelayMsec(-1);