Package java.io

Examples of java.io.FileNotFoundException


    sTargetUri = "file://" + sTargetUri;
  }
 
    FileSystem oFs = new FileSystem();
  if (!oFs.exists(sSourceUri)) {
    throw new FileNotFoundException("PageDB.publish() file not found "+getString(DB.path_page));
  }
  return oFs.copy(sSourceUri, sTargetUri);
  } // publish
View Full Code Here


      if (oGlobalDbb==null && oDBB!=null) oDBB.close();

      sLastError = "FileNotFoundException " + e.getMessage();

      if (iCallbacks>0) callBack(-1, sLastError, new FileNotFoundException(e.getMessage()), null);

      if (oJob!=null) oJob.log(sLastError + "\n");
    }
    catch (IOException e) {
View Full Code Here

  static public FeatureDataset factory(String location, FeatureType wantFeatureType, DatasetCollectionManager dcm, Formatter errlog) throws IOException {

    TimedCollection collection = new TimedCollection(dcm, errlog);
    if (collection.getDatasets().size() == 0) {
      throw new FileNotFoundException("Collection is empty; spec="+dcm);
    }

    if (wantFeatureType == FeatureType.ANY_POINT) {
      TimedCollection.Dataset d = collection.getPrototype();
      FeatureDatasetPoint proto = (FeatureDatasetPoint) FeatureDatasetFactoryManager.open(FeatureType.ANY_POINT, d.getLocation(), null, errlog);
View Full Code Here

  public TableConfig readConfigXMLfromResource(String resourceLocation, FeatureType wantFeatureType, NetcdfDataset ds, Formatter errlog) throws IOException {
    ClassLoader cl = this.getClass().getClassLoader();
    InputStream is = cl.getResourceAsStream(resourceLocation);
    if (is == null)
      throw new FileNotFoundException(resourceLocation);

    if (debugXML) {
      System.out.println(" PointConfig URL = <" + resourceLocation + ">");
      InputStream is2 = cl.getResourceAsStream(resourceLocation);
      System.out.println(" contents=\n" + IO.readContents(is2));
View Full Code Here

  if (!oFs.exists(sFilePath)) {
      if (DebugFile.trace) {
        DebugFile.writeln("FileNotFoundException: PasswordRecordTemplate.load() "+sFilePath);
        DebugFile.decIdent();
      }
      throw new FileNotFoundException("PasswordRecordTemplate.load() "+sFilePath);
  }

    String sTemplate = oFs.readfilestr(sFilePath, "UTF-8");

  oMasterRecord.lines().clear();
View Full Code Here

    if (null==sFileName)
      throw new NullPointerException("Contact.addAttachment() File name may not be null");

    File oDir = new File(sDirPath);
    if (!oDir.isDirectory())
      throw new FileNotFoundException("Contact.addAttachment() "+sDirPath+" is not a directory");

    if (!oDir.exists())
      throw new FileNotFoundException("Contact.addAttachment() Directory "+sDirPath+" not found");

    File oFile = new File(Gadgets.chomp(sDirPath,File.separatorChar)+sFileName);
    if (!oFile.exists())
      throw new FileNotFoundException("Contact.addAttachment() File "+Gadgets.chomp(sDirPath,File.separatorChar)+sFileName+" not found");

    // Get Id. of Domain to which Contact belongs
    Integer iDom = ACLDomain.forWorkArea(oConn, getString(DB.gu_workarea));

    if (DebugFile.trace) DebugFile.writeln("id_domain="+iDom);
View Full Code Here

    throws SQLException,NullPointerException,FileNotFoundException,Exception {

    File oDir = new File(sDirPath);

    if (!oDir.exists())
      throw new FileNotFoundException("Contact.addAttachment() Directory "+sDirPath+" not found");

    if (!oDir.isDirectory())
      throw new FileNotFoundException("Contact.addAttachment() "+sDirPath+" is not a directory");

    if (!oDir.exists())
      throw new FileNotFoundException("Contact.addAttachment() Directory "+sDirPath+" not found");

    File[] aFiles = oDir.listFiles();
    if (null!=aFiles) {
      int nFiles = aFiles.length;
      for (int f=0; f<nFiles; f++)
View Full Code Here

    FileSystem oFs = new FileSystem();
    try {
      oFs.mkdirs("file://"+sDirectory);
    } catch (Exception xcpt) {
        if (DebugFile.trace) DebugFile.writeln(xcpt.getClass()+" "+xcpt.getMessage());
        throw new FileNotFoundException ("Could not create directory "+sDirectory+" "+xcpt.getMessage());
    }
    } else {
    File[] aFiles = oDir.listFiles();
    if (aFiles==null) {
      bNewIndex = true;
View Full Code Here

    if (null==sFileName)
      throw new NullPointerException("Activity.addAttachment() File name may not be null");

    File oDir = new File(sDirPath);
    if (!oDir.isDirectory())
      throw new FileNotFoundException("Activity.addAttachment() "+sDirPath+" is not a directory");

    if (!oDir.exists())
      throw new FileNotFoundException("Activity.addAttachment() Directory "+sDirPath+" not found");

    File oFile = new File(Gadgets.chomp(sDirPath,File.separatorChar)+sFileName);
    if (!oFile.exists())
      throw new FileNotFoundException("Activity.addAttachment() File "+Gadgets.chomp(sDirPath,File.separatorChar)+sFileName+" not found");

    // Get Id. of Domain to which Contact belongs
    Integer iDom = ACLDomain.forWorkArea(oConn, getString(DB.gu_workarea));

    if (DebugFile.trace) DebugFile.writeln("id_domain="+iDom);
View Full Code Here

    if (DebugFile.trace) DebugFile.writeln("index directory is " + sDirectory);

    File oDir = new File(sDirectory);
    if (!oDir.exists()) {
      if (DebugFile.trace) DebugFile.decIdent();
      throw new FileNotFoundException("Directory " + sDirectory + " does not exist");
    }

    if (DebugFile.trace)
      DebugFile.writeln("Class.forName(" + oProps.getProperty("analyzer" , DEFAULT_ANALYZER) + ")");
View Full Code Here

TOP

Related Classes of java.io.FileNotFoundException

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.