Examples of canRead()


Examples of java.io.File.canRead()

        File fca = new File(fcaPath);
        if (!fca.exists()) {
            fcaPath = path + "/fca.";
            fca = new File(fcaPath);
        }
        if (!fca.canRead()) {
            println("");
            return null;
        }
        try {
            DcwRecordFile fcadesc = new DcwRecordFile(fcaPath);
View Full Code Here

Examples of java.io.File.canRead()

    {
      return urlFromConfig;
    }

    final File localFile = new File("jlfgr-1_0.jar");
    if (localFile.exists() && localFile.canRead() && localFile.isFile())
    {
      try
      {
        return localFile.toURL();
      }
View Full Code Here

Examples of java.io.File.canRead()

    }

    final File classpathFile = findFileOnClassPath("jlfgr-1_0.jar");
    if (classpathFile != null)
    {
      if (classpathFile.exists() && classpathFile.canRead() && classpathFile.isFile())
      {
        try
        {
          return classpathFile.toURL();
        }
View Full Code Here

Examples of java.io.File.canRead()

    try
    {
      if (o instanceof File)
      {
        final File f = (File) o;
        if (f.canRead())
        {
          return f.toURL();
        }
      }
      else if (o instanceof String)
View Full Code Here

Examples of java.io.File.canRead()

 
  public synchronized void start(PrintStream out) throws IOException
  {
    if (_server == null) {
      File source = _configGen;
      if (!source.exists() || !source.canRead()) {
        source = _config;
     
      out.println("server starting up: "+source);
      ConfigReader reader = new ConfigReader(this, source);
      Server server = reader.parse();
View Full Code Here

Examples of java.io.File.canRead()

    {
      throw new IllegalArgumentException("The give path is not valid."); //$NON-NLS-1$
    }

    final File target = new File(baseDirectory, configPath);
    return target.exists() && target.canRead();
  }

  public String toString()
  {
    return "FileConfigStorage={baseDir=" + baseDirectory + '}'; //$NON-NLS-1$ //$NON-NLS-2$
View Full Code Here

Examples of java.io.File.canRead()

            ("Unable to create the specified directory."); //$NON-NLS-1$
      }
    }
    else
    {
      if (baseDirectoryFile.canRead() == false ||
          baseDirectoryFile.canWrite() == false)
      {
        throw new ModuleInitializeException
            ("Unable to access the specified directory."); //$NON-NLS-1$
      }
View Full Code Here

Examples of java.io.File.canRead()

          for (String propertyFile : new File(getTempDir()).list()) {
             
              if (!propertyFile.endsWith(getTempFileSuffix())) continue;
             
              File tmpFile = new File(getTempDir() + propertyFile);
              if (!tmpFile.canRead()) {
                  logger.info("Could not read drive information file: " + tmpFile + " The drive for which this file was created will be skipped!");
                  continue;
              }
             
                RandomAccessFile raf = new RandomAccessFile(tmpFile, "r");
View Full Code Here

Examples of java.io.File.canRead()

    public DcwRecordFile[] getTables(DcwRecordFile drf) throws FormatException {
        DcwRecordFile[] retval = new DcwRecordFile[drf.getColumnCount()];
        File dirPath = new File(drf.getTableFile()).getParentFile();
        File fcsfile = new File(dirPath, "fcs");
        if (!fcsfile.canRead()) {
            fcsfile = new File(dirPath, "fcs.");
        }
        DcwRecordFile fcs = new DcwRecordFile(fcsfile.toString());
        List l = new ArrayList(fcs.getColumnCount());
        String tableName = drf.getTableName();
View Full Code Here

Examples of java.io.File.canRead()

        }
    }

    public String[] getFeatureNames(File dirPath) throws FormatException {
        File fcafile = new File(dirPath, "fca");
        if (!fcafile.canRead()) {
            fcafile = new File(dirPath, "fca.");
        }
        DcwRecordFile fca = new DcwRecordFile(fcafile.toString());
        List l = new ArrayList(fca.getColumnCount());
        int fclassColumn = fca.whatColumn("fclass");
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.