Package java.io

Examples of java.io.FileNotFoundException


   public VersionRelease(String homeDir)
      throws FileNotFoundException, NoSuchAlgorithmException
   {
      jbossHome = new File(homeDir);
      if( jbossHome.exists() == false )
         throw new FileNotFoundException(jbossHome.getAbsolutePath() + " does not exist");
      specTitle = System.getProperty("specification.title");
      specVersion = System.getProperty("specification.version");
      specVendor = System.getProperty("specification.vendor");
      implTitle = System.getProperty("implementation.title");
      implURL = System.getProperty("implementation.url");
View Full Code Here


  public FileServiceRequestHandler(String fileBasepath, boolean isShowDirectoryTree) throws FileNotFoundException {
      this.fileBase = new File(fileBasepath);
      this.isShowDirectoryTree = isShowDirectoryTree;
   
    if (!new File(fileBasepath).exists()) {
      throw new FileNotFoundException("base path "+ fileBasepath + "does not exits");
    }
  }
View Full Code Here

    public InputStream getEntryInputStream(String name) throws IOException {
   
      File f = new File(basedir, name);
     
      if(!f.exists())
        throw new FileNotFoundException(name + " is not a valid " + basedir.getName() + " entry");
     
      return new FileInputStream(f);
    }
View Full Code Here

      InputStream in = AbstractXMLEntityResolver.class.getResourceAsStream(localPath);
      if (in == null)
      {
        JPOXLogger.METADATA.fatal("local resource \"" + localPath + "\" does not exist!!!");
        throw new FileNotFoundException("Unable to load resource: " + localPath);
      }
      return new InputSource(new InputStreamReader(in));
    }
View Full Code Here

    }

    private static String[] getTestFiles() throws FileNotFoundException {
        String location = SystemProperties.get("test.location", "");
        if (location.length() == 0) {
            throw new FileNotFoundException("No Test Files Found");
        }

        Collection<String> fileNames = new HashSet<String>();
        for (StringTokenizer tokenizer = new StringTokenizer(location, ";"); tokenizer.hasMoreTokens();) {
            fileNames.addAll(getTestFiles(tokenizer.nextToken()));
View Full Code Here

      url = System.class.getClassLoader().getSystemResource(filename);
      if(url!=null)
        return url.toString();

      // Not found :-(
      throw new FileNotFoundException( "Can't find file '" + filename + "'.");
  }
View Full Code Here

     input = this.getClass().getResourceAsStream(filename);
     if(input==null)
       input = System.class.getClassLoader().getSystemResourceAsStream(filename);

     if(input==null)
        throw new FileNotFoundException( "rule file '" + filename + "' not found.");
     }

  try
    {
    parse( repository, input );
View Full Code Here

    InputStream input = this.getClass().getResourceAsStream(filename);
    if(input==null)
      input = new FileInputStream( new File(filename) );

    if(input==null)
      throw new FileNotFoundException( "rule file '" + filename + "' not found.");

    try
      {
      return (Transformation)digester.parse(input);
      }
View Full Code Here

        dir = new File(dirString);
        if (!dir.exists() || !dir.isDirectory()) {
          throw new Exception(
              "Invalid cron working directory parameter at line: "
                  + line,
              new FileNotFoundException(dirString
                  + " doesn't exist or it is not a directory"));
        }
      }
      // Builds the task.
      ProcessTask process = new ProcessTask(cmdarray, envs, dir);
View Full Code Here

        throwExceptionIfExist();
       
        isDataRead = true;
       
        if (!file.exists()) {
          throw new FileNotFoundException("file " + file.getAbsolutePath() + " does not exist");
        } else {
          BodyDataSink dataSink = new FileDataSink(getHeader(), executor, file);
         
          TransferResultHandlerAdapter adapter = new TransferResultHandlerAdapter(resultHandler);
          dataSink.addCloseListener(adapter);
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.