Package org.apache.nutch.plugin

Examples of org.apache.nutch.plugin.PluginDescriptor


  /**
   * Process a request for resource inside plugin
   */
  protected void doGet(HttpServletRequest request, HttpServletResponse response)
      throws ServletException, IOException {
    PluginDescriptor descriptor = null;
    String resPath = null;

    String path = getContextRelativePath(request);
    String id = getPluginId(path);
    if (id != null) {
      resPath = PATH.substring(1) + getPluginRelativePath(path);

      descriptor = getServiceLocator().getPluginRepository()
          .getPluginDescriptor(id);

      if (descriptor != null) {

        if (descriptor != null) {
          InputStream is = descriptor.getClassLoader().getResourceAsStream(
              resPath);
          if (is != null) {
            // buffer for content
            byte[] buffer = new byte[response.getBufferSize()];

View Full Code Here

TOP

Related Classes of org.apache.nutch.plugin.PluginDescriptor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.