Package java.io

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


          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

    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

        }
    }

    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

        String faceIDColumnName = null;
        // read fcs to figure out what column in tileref.aft we need
        // to use to
        // read the fbr (face bounding rectangle) table
        File fcsFile = new File(pathname, "fcs");
        if (!fcsFile.canRead()) {
            fcsFile = new File(pathname, "fcs.");
        }
        DcwRecordFile fcs = new DcwRecordFile(fcsFile.toString());
        Vector fcsv = new Vector(fcs.getColumnCount());
        while (fcs.parseRow(fcsv)) {
View Full Code Here

    private HashMap loadIntVDT(File path, String tableName) {
        HashMap hm = new HashMap();
        try {
            File vdt = new File(path, Constants.intVDTTableName);
            if (vdt.canRead()) {
                DcwRecordFile intvdt = new DcwRecordFile(vdt.toString());
                int intcols[] = intvdt.lookupSchema(CoverageTable.VDTColumnNames,
                        true,
                        CoverageTable.intVDTschematype,
                        CoverageTable.intVDTschemalength,
View Full Code Here

    private HashMap loadCharVDT(File path, String tableName) {
        HashMap hm = new HashMap();
        try {
            File vdt = new File(path, Constants.charVDTTableName);
            if (vdt.canRead()) {
                DcwRecordFile charvdt = new DcwRecordFile(vdt.toString());
                int charcols[] = charvdt.lookupSchema(CoverageTable.VDTColumnNames,
                        true,
                        CoverageTable.charVDTschematype,
                        CoverageTable.charVDTschemalength,
View Full Code Here

         StringTokenizer st = new StringTokenizer(classPathStr, ";:");
         while (st.hasMoreElements()) {
            String jar = (String)st.nextElement()// e.g. "soap/soap.jar"
            if (log.isLoggable(Level.FINE)) log.fine("Looking for jar '" + jar + "' ...");
            File f = new File(jar); // 1. check absolute path
            if (f.canRead()) {
               classPath.add(jar);
               continue;
            }
            String jarStripped = f.getName();      // e.g. "soap.jar"
            if (log.isLoggable(Level.FINE)) log.fine("Looking for jarStripped '" + jarStripped + "' ...");
View Full Code Here

               continue;
            }
            String jarStripped = f.getName();      // e.g. "soap.jar"
            if (log.isLoggable(Level.FINE)) log.fine("Looking for jarStripped '" + jarStripped + "' ...");
            f = new File(jarStripped);      // 2. check local directory
            if (f.canRead()) {
               classPath.add(jarStripped);
               continue;
            }
            String resourceJar = loaderInfo.rootPath +jar; // e.g. "/home/xmlblast/xmlBlaster/lib/soap/soap.jar"
            if (log.isLoggable(Level.FINE)) log.fine("Looking for resourceJar=" + resourceJar + " ...");
View Full Code Here

               continue;
            }
            String resourceJar = loaderInfo.rootPath +jar; // e.g. "/home/xmlblast/xmlBlaster/lib/soap/soap.jar"
            if (log.isLoggable(Level.FINE)) log.fine("Looking for resourceJar=" + resourceJar + " ...");
            f = new File(resourceJar);      // 3. check resource path of this instance
            if (f.canRead()) {
               classPath.add(resourceJar);
               continue;
            }
            String resourceJarStripped = loaderInfo.rootPath +jar;   // e.g. "/home/xmlblast/xmlBlaster/lib/soap.jar"
            if (log.isLoggable(Level.FINE)) log.fine("Looking for resourceJarStripped=" + resourceJarStripped + " ...");
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.