Examples of FileNotFoundException


Examples of java.io.FileNotFoundException

  private void openFile(final File file, Filter<ProtocolFilterTarget> filter)
      throws IOException, FileFormatException {

    if (file.canRead() == false) {
      throw new FileNotFoundException("File [" + file.getName()
          + "] is not readable, can not open in [" + mode.toString() + "]mode");
    }

    if (mode.isAppend() || mode.isContent() || mode.isStructure()) {
      if (file.canWrite() == false) {
        throw new FileNotFoundException("File [" + file.getName()
            + "] is readonly, can not open in read-write mode");
      }
    }

    this.editor = new FileEditorImpl(file, this.mode, headerReader,
View Full Code Here

Examples of java.io.FileNotFoundException

                }

            }

            if (inputReader == null) {
                throw new FileNotFoundException("BinaryFile can't find: "
                        + name);
            }

            classCount++;
            openCount++;
View Full Code Here

Examples of java.io.FileNotFoundException

    if (!oFile.exists()) {
      if (DebugFile.trace) {
        DebugFile.writeln("File not found " + sFilePath);
        DebugFile.decIdent();
      }
      throw new FileNotFoundException(sFilePath);
    }
    long lastMod = oFile.lastModified();

    TransformerFactory oFactory;
    Templates oTemplates;
View Full Code Here

Examples of java.io.FileNotFoundException

    if (null==oOutputStream)
        throw new NullPointerException ("StylesheetCache.transform() OutputStream may not be null");

    if (DebugFile.trace) {
      if (!new File(sStyleSheetPath).exists())
        throw new FileNotFoundException ("StylesheetCache.transform() "+sStyleSheetPath);

      lElapsed = System.currentTimeMillis();

      DebugFile.writeln("Begin StylesheetCache.transform(" + sStyleSheetPath + ", InputStream, Properties)");
      DebugFile.incIdent();
View Full Code Here

Examples of java.io.FileNotFoundException

    {
        InputStream in = context.getResourceAsStream( path, request.getClient(  ), request.getLocale(  ) );

        if ( in == null )
        {
            throw new FileNotFoundException( path );
        }

        PrintWriter writer = response.getWriter(  );
        int         len;
        byte        buff[] = new byte[ BUFFER_SIZE ];
View Full Code Here

Examples of java.io.FileNotFoundException

                   IOException
    {
        String templatePath = context.getResourcePath( path, request.getClient(  ), request.getLocale(  ) );
        if ( templatePath == null )
        {
            throw new FileNotFoundException( path );
        }

        getVelocityService(  ).merge( templatePath, request, response );
    }
View Full Code Here

Examples of java.io.FileNotFoundException

        if(is == null) {
          FileInputStream file = new FileInputStream(name);
          //System.err.println("/home/torbjorn/sandbox/jdk/" + name);

          if(file == null) {
            throw new FileNotFoundException(name);
          }

          // // Does not work without DummyInputStream. Why?
          //is = new DataInputStream(new DummyInputStream(new BufferedInputStream(file)));
          is = new DataInputStream(new BufferedInputStream(file));
View Full Code Here

Examples of java.io.FileNotFoundException

      oParserWrapper.setFeature("http://apache.org/xml/features/validation/schema", bValidation);
      oParserWrapper.setFeature("http://apache.org/xml/features/validation/schema-full-checking", bValidation);

      if (sURI.startsWith("file://")) {
        File oXMLFile = new File(sURI.substring(7));
        if (!oXMLFile.exists()) throw new FileNotFoundException("DOMDocument.parseURI(" + sURI.substring(7) + ") file not found");
        if (null==sEncoding) {
          if (DebugFile.trace) DebugFile.writeln("new FileReader(" + sURI.substring(7) + ")");
          oReader = new FileReader(oXMLFile);
          if (DebugFile.trace) DebugFile.writeln("DOMParserWrapper.parse([InputSource])");
        } else {
View Full Code Here

Examples of java.io.FileNotFoundException

                throw new IllegalArgumentException("empty path for directory");
            File dir = pathIter.next();
            if (pathIter.hasNext())
                throw new IllegalArgumentException("path too long for directory");
            if (!dir.exists())
                throw new FileNotFoundException(dir + ": does not exist");
            else if (!dir.isDirectory())
                throw new IOException(dir + ": not a directory");
            return dir;
        }
View Full Code Here

Examples of java.io.FileNotFoundException

          runIdx = i;
          break;
        }
      }
      if (runIdx < 0)
        throw new FileNotFoundException("No run date of " + run);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.