Package org.cipres.treebase.web.model

Examples of org.cipres.treebase.web.model.FileBean


  public List<FileBean> getFiles(HttpServletRequest request) throws Exception {
    if (request instanceof MultipartHttpServletRequest) {

      MultipartHttpServletRequest multiReq = (MultipartHttpServletRequest) request;
      MultipartFile file = null;
      FileBean fileBean = null;
      List<FileBean> files = new ArrayList<FileBean>();
      for (Object o : multiReq.getFileMap().values()) {
        if (o != null) {
          file = (MultipartFile) o;
          if (!file.isEmpty()) {
            fileBean = new FileBean();
            fileBean.setName(file.getOriginalFilename());
            fileBean.setData(file.getBytes());
            files.add(fileBean);
          }
        }
      }
      return files;
View Full Code Here


  public List<FileBean> getFiles(HttpServletRequest request) throws Exception {
    if (request instanceof MultipartHttpServletRequest) {

      MultipartHttpServletRequest multiReq = (MultipartHttpServletRequest) request;
      MultipartFile file = null;
      FileBean bean = null;
      List<FileBean> files = new ArrayList<FileBean>();
      for (Object o : multiReq.getFileMap().values()) {
        if (o != null) {
          file = (MultipartFile) o;
          if (!file.isEmpty()) {
            bean = new FileBean();
            bean.setName(file.getOriginalFilename());
            bean.setData(file.getBytes());
            files.add(bean);
          }
        }
      }
      return files;
View Full Code Here

   */
  public List<FileBean> getFiles(HttpServletRequest request) throws Exception {

    MultipartHttpServletRequest multiReq = (MultipartHttpServletRequest) request;
    MultipartFile file = null;
    FileBean bean = null;
    List<FileBean> files = new ArrayList<FileBean>();

    for (Object o : multiReq.getFileMap().values()) {
      if (o != null) {
        file = (MultipartFile) o;
        if (!file.isEmpty()) {
          bean = new FileBean();
          bean.setName(file.getOriginalFilename());
          bean.setData(file.getBytes());
          files.add(bean);
        }
      }
    }
    return files;
View Full Code Here

   */
  public List<FileBean> getFiles(HttpServletRequest request) throws Exception {

    MultipartHttpServletRequest multiReq = (MultipartHttpServletRequest) request;
    MultipartFile file = null;
    FileBean bean = null;
    List<FileBean> files = new ArrayList<FileBean>();

    for (Object o : multiReq.getFileMap().values()) {
      if (o != null) {
        file = (MultipartFile) o;
        if (!file.isEmpty()) {
          bean = new FileBean();
          bean.setName(file.getOriginalFilename());
          bean.setData(file.getBytes());
          files.add(bean);
        }
      }
    }
    return files;
View Full Code Here

TOP

Related Classes of org.cipres.treebase.web.model.FileBean

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.