Package java.io

Examples of java.io.FileNotFoundException


      double[] offsets = getForecastOffsets();
      for (int i=0; i<offsets.length; i++)
        if (Misc.closeEnough(offsets[i], offset)) ok = true;

      if (!ok)
        throw new FileNotFoundException("No constant offset dataset for = " + offset);
    }
View Full Code Here


    File oFile = new File(sFilePath);

    if (oFile==null) {
      if (DebugFile.trace) DebugFile.decIdent();
      throw new FileNotFoundException(sFilePath);
    }
    if (!oFile.exists()) {
      if (DebugFile.trace) DebugFile.decIdent();
      throw new FileNotFoundException(sFilePath);
    }

    PreparedStatement oStmt = oConn.prepareStatement("INSERT INTO " + DB.k_bugs_attach + "(" + DB.gu_bug + "," + DB.tx_file + "," + DB.len_file + "," + DB.bin_file + ") VALUES (?,?,?,?)");

    int iFileLen = new Long(oFile.length()).intValue();
View Full Code Here

    if (0==args.length)
      throw new NullPointerException("SendMail.main() Path of properties file is required");

    File oPropsFile = new File(args[0]);
    if (!oPropsFile.exists()) {
      throw new FileNotFoundException("SendMail.main() file not found "+args[0]);
    }
 
    if (DebugFile.trace) {
      DebugFile.incIdent();
      DebugFile.write("Begin SendMail.main(");
View Full Code Here

        if (null!=oStrLog) oStrLog.append("FileNotFoundException "+sResourcePath);
        if (DebugFile.trace) {
          DebugFile.writeln("FileNotFoundException "+sResourcePath);
          DebugFile.decIdent();
        }
        throw new FileNotFoundException("executeBulk() " + sResourcePath);
      } // fi

      if (DebugFile.trace) DebugFile.writeln("new InputStreamReader([InputStream], "+sEncoding+")");

      oStrm = new InputStreamReader(oInStrm, sEncoding);
View Full Code Here

    if (null==sEncoding) sEncoding = "UTF-8";

    InputStream oIoStrm = this.getClass().getResourceAsStream(sResourcePath);

  if (null==oIoStrm) throw new FileNotFoundException("Resource "+sResourcePath+" not found for class "+this.getClass().getName());

    oReader = new InputStreamReader(oIoStrm, sEncoding);

  if (null==oReader) {
      if (DebugFile.trace) {
        DebugFile.writeln("Could not find file " + sResourcePath);
        DebugFile.decIdent();
      }   
    throw new FileNotFoundException("Could not open resource file " + sResourcePath);
  }
 
    while (true) {
      iReaded = oReader.read(Buffer, 0, 4000);
View Full Code Here

    if (sMsiteURI.startsWith("/") || sMsiteURI.startsWith("\\")) {

      File oMFile = new File(sMsiteURI);

      if (!oMFile.exists())
        throw new FileNotFoundException (sMsiteURI + " not found");

      oMFile = null;

      oMSite = MicrositeFactory.getInstance("file://" + sMsiteURI, bValidateXML);
    }
View Full Code Here

    if (sPageSetURI.startsWith("file://")) {
      oPFile = new File(sPageSetURI.substring(7));

      if (!oPFile.exists())
        throw new FileNotFoundException (sPageSetURI.substring(7) + " not found");

      if (DebugFile.trace) DebugFile.writeln("parseURI (" + sPageSetURI  + ");");

      parseURI(sPageSetURI, "UTF-8");
    }
    else {
      oPFile = new File(sPageSetURI);

      if (!oPFile.exists())
        throw new FileNotFoundException (sPageSetURI + " not found");

      if (DebugFile.trace) DebugFile.writeln("parseURI (file://" + sPageSetURI  + ");");

      parseURI("file://" + sPageSetURI, "UTF-8");
    }
View Full Code Here

    if (sPageSetURI.startsWith("file://")) {
      oPFile = new File(sPageSetURI.substring(7));

      if (!oPFile.exists())
        throw new FileNotFoundException (sPageSetURI.substring(7) + " not found");

      parseURI(sPageSetURI, "UTF-8");
    }
    else {
      oPFile = new File(sPageSetURI);

      if (!oPFile.exists())
        throw new FileNotFoundException (sPageSetURI + " not found");

      parseURI("file://" + sPageSetURI, "UTF-8");
    }
  } // PageSet()
View Full Code Here

    if (!new File(oCurrentPage.filePath()).exists()) {
          if (DebugFile.trace) {
            DebugFile.writeln("FileNotFoundException: PageSet.buildSite() could not create file "+oCurrentPage.filePath());
            DebugFile.decIdent();
          }
      throw new FileNotFoundException("PageSet.buildSite() could not create file "+oCurrentPage.filePath());
    } // fi (exists())
      }
      catch (TransformerConfigurationException e) {
        oLastXcpt = e;
        if (DebugFile.trace) DebugFile.writeln("ERROR TransformerConfigurationException " + e.getMessageAndLocation());
View Full Code Here

      oCurrentPage = this.page(sPageGUID);

    oXMLFile = new File (sURI.startsWith("file://") ? sURI.substring(7) : sURI);
    if (!oXMLFile.exists()) {
        if (DebugFile.trace) DebugFile.decIdent();
      throw new FileNotFoundException("PageSet.buildPageForEdit() File not found "+sURI);
    }

      oXMLStream = new FileInputStream(oXMLFile);
      oStreamSrcXML = new StreamSource(oXMLStream);

      // Asignar cada stream de salida a su stream temporal
      oStrWritter = new StringWriter();
      oStreamResult = new StreamResult(oStrWritter);

      // Transformacion XSLT
      try {

        // Obtener la hoja de estilo desde el cache
        sXSLFile = sBasePath + "xslt" + sSep + "templates" + sSep + oMSite.name() + sSep + oCurrentPage.template();
      oXSLFile = new File (sXSLFile);
      if (!oXSLFile.exists()) {
          if (DebugFile.trace) DebugFile.decIdent();
        throw new FileNotFoundException("PageSet.buildPageForEdit() File not found "+sXSLFile+" maybe there is a mismatch between the microsite name and the directory name where it is placed, or between the template name and the actual .xsl file name");
      }

        oTransformer = StylesheetCache.newTransformer(sXSLFile);

        sMedia = oTransformer.getOutputProperty(OutputKeys.MEDIA_TYPE);
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.