Examples of FileResourceSource


Examples of com.avaje.ebeaninternal.server.lib.resource.FileResourceSource

    if (fileDir != null) {
      // explicitly stated so
      File dir = new File(fileDir);
      if (dir.exists()) {
        logger.info("ResourceManager initialised: type[file] [" + fileDir + "]");
        return new FileResourceSource(fileDir);
      } else {
        String msg = "ResourceManager could not find directory [" + fileDir + "]";
        throw new NotFoundException(msg);
      }
    }

    // try to guess the directory starting from the current working
    // directory, and searching to a maximum depth of 3 subdirectories
    File guessDir = DirectoryFinder.find(null, "WEB-INF", 3);
    if (guessDir != null) {
      // Typically this means we found the WEB-INF directory below the
      // current working directory
      logger.info("ResourceManager initialised: type[file] [" + guessDir.getPath() + "]");
      return new FileResourceSource(guessDir.getPath());
    }

    // default to the current working directory
    File workingDir = new File(".");
    return new FileResourceSource(workingDir);
  }
View Full Code Here

Examples of rabbit.proxy.FileResourceSource

  size = (lowQualitySize < origSize ? lowQualitySize : origSize);
  response.setHeader ("Content-length", "" + size);
  con.setExtraInfo ("imageratio:" + origSize + "/" + lowQualitySize +
        "=" + ((float)lowQualitySize / origSize))
  content.release (con);
  content = new FileResourceSource (entryName, con.getProxy ());
  convertedFile = null;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.