Package gri.data.converters

Examples of gri.data.converters.ConversionException


    try {
        File file = FileUtil.copyToTempFile(tFile, this.dir);
        return file;
    }
    catch(Exception e) {
        throw new ConversionException(e);
    }
      }
  }
View Full Code Here


    try {
        //create directory (if it doesn't exist)
        if (this.dir != null && !this.dir.exists()) {
      boolean success = this.dir.mkdirs();
      if (!success)
          throw new ConversionException("Parent directory does not exist and could not be created");
        }
       
        //create file:
        File file = new File(this.dir, tFile.getName());
        if (file.exists())
      file = FileUtil.createTempFile(tFile, this.dir);
     
        FileUtil.copyTo(tFile, file);
        if (logger.isDebugEnabled())
      logger.debug("File written: " + file.getPath());
        return file;
    }
    catch(Exception e) {
        throw new ConversionException(e);
    }
      }
  }
View Full Code Here

TOP

Related Classes of gri.data.converters.ConversionException

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.