class PluginIconServlet extends HttpServlet {

    @Override
    public void init(ServletConfig config) throws ServletException {
        super.init(config);
    }

    @Override
    public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException {<FILL_FUNCTION_BODY>}
}

        String canonicalName = ParamUtils.getParameter(request, "plugin");
        PluginManager pluginManager = XMPPServer.getInstance().getPluginManager();
        PluginMetadata metadata = pluginManager.getMetadata( canonicalName );
        if (metadata != null) {
            final URL icon = metadata.getIcon();
            if ( icon != null ) {
                // Clear any empty lines added by the JSP declaration. This is required to show
                // the image in resin!
                response.reset();
                if ( icon.toExternalForm().toLowerCase().endsWith( ".png" )) {
                    response.setContentType("image/png");
                }
                else if (icon.toExternalForm().toLowerCase().endsWith( ".png" )) {
                    response.setContentType("image/gif");
                }
                try (InputStream in = icon.openStream()) {
                    try (OutputStream ost = response.getOutputStream()) {
                        byte[] buf = new byte[1024];
                        int len;
                        while ((len = in.read(buf)) >= 0) {
                            ost.write(buf, 0, len);
                        }
                        ost.flush();
                    }
                } catch (IOException ioe) {
                    throw new ServletException(ioe);
                }
            }
        }
    
<no_super_class>