Examples of canRead()


Examples of java.io.File.canRead()

  static void make(DiskCache2 dc, String filename) throws IOException {
    File want = dc.getCacheFile(filename);
    System.out.println("make=" + want.getPath() + "; exists = " + want.exists());
    if (!want.exists())
      want.createNewFile();
    System.out.println(" canRead= " + want.canRead() + " canWrite = " + want.canWrite() + " lastMod = " + new Date(want.lastModified()));

    String enc = EscapeStrings.urlEncode(filename);
    System.out.println(" original=" + EscapeStrings.urlDecode(enc));
    /* try {
      String enc = java.net.URLEncoder.encode(filename, "UTF8");
View Full Code Here

Examples of java.io.File.canRead()

    if ( ! sourceDataFile.exists() )
    {
      fail( "Non-existent source data file [" + sourceDataFile.getPath() + "].");
      return false;
    }
    if ( ! sourceDataFile.canRead() )
    {
      fail( "Cannot read source data file [" + sourceDataFile.getPath() + "]." );
      return false;
    }
View Full Code Here

Examples of java.io.File.canRead()

    if ( ! sourceDataFile.exists())
    {
      fail( "Non-existent source data file [" + sourceDataFile.getPath() + "].");
      return false;
    }
    if ( ! sourceDataFile.canRead() )
    {
      fail( "Cannot read data file [" + sourceDataFile.getPath() + "]." );
      return false;
    }
View Full Code Here

Examples of java.io.File.canRead()

    if ( ! sourceDataFile.exists())
    {
      fail( "Non-existent source GRIB file [" + sourceDataFile.getPath() + "].");
      return false;
    }
    if ( ! sourceDataFile.canRead())
    {
      fail( "Cannot read the source GRIB file [" + sourceDataFile.getPath() + "].");
      return false;
    }
View Full Code Here

Examples of java.io.File.canRead()

    if ( ! indexFileSource.exists() )
    {
      fail( "Non-existent source index file [" + indexFileSource + "]." );
      return false;
    }
    if ( ! indexFileSource.canRead() )
    {
      fail( "Cannot read source index file [" + indexFileSource.getPath() + "]." );
      return false;
    }
View Full Code Here

Examples of javax.microedition.io.file.FileConnection.canRead()

            props.append(new StringItem(T._("Type"), fc.isDirectory() ? T._("Directory") : T._("Regular File")));
            props.append(new StringItem(T._("Size"), Long.toString((fc.isDirectory() ? fc.directorySize(true) : fc.fileSize()))));
            props.append(new StringItem(T._("Modified"), myDate(fc.lastModified())));

            ChoiceGroup attrs = new ChoiceGroup(T._("Attributes"), Choice.MULTIPLE, attrList, null);
            attrs.setSelectedFlags(new boolean[] { fc.canRead(), fc.canWrite(), fc.isHidden() });
            props.append(attrs);

            if (fileName.toLowerCase().endsWith(".sgf"))
                try {
                    StringBuffer sb = new StringBuffer();
View Full Code Here

Examples of jcifs.smb.SmbFile.canRead()

    InputStream in = null;
    try {
      SmbFile smbFile = RegainToolkit.urlToSmbFile(
        CrawlerToolkit.replaceAuthenticationValuesInURL(url, mAccountPasswordEntry));
   
      if( smbFile.canRead() && !smbFile.isDirectory() ) {
        in = smbFile.getInputStream();
        mLastModifiedDate = new Date(smbFile.lastModified());
       
        return CrawlerToolkit.loadFileFromStream(in,smbFile.getContentLength());
       
View Full Code Here

Examples of jcifs.smb.SmbFile.canRead()

        try {
          SmbFile smbFile = RegainToolkit.urlToSmbFile(
            CrawlerToolkit.replaceAuthenticationValuesInURL(url,
            CrawlerToolkit.findAuthenticationValuesForURL(url, accountPasswordStore)));
          // Check whether the file is readable.
          if (!smbFile.canRead()) {
            mCrawlerJobProfiler.abortMeasuring();
            logError("File is not readable: '" + url + "'", null, false);
            continue;
          } else if (smbFile.isDirectory()) {
            // This IS a directory -> Add all child files as Jobs
View Full Code Here

Examples of net.sourceforge.squirrel_sql.fw.util.FileWrapper.canRead()

  public boolean downloadLocalUpdateFile(String fileToGet, String destDir) throws FileNotFoundException,
    IOException
  {
    boolean result = false;
    FileWrapper fromFile = _fileWrapperFactory.create(fileToGet);
    if (fromFile.isFile() && fromFile.canRead())
    {
      String filename = fromFile.getName();
      FileWrapper toFile = _fileWrapperFactory.create(destDir, filename);
      copyFile(fromFile, toFile);
      result = true;
View Full Code Here

Examples of net.yacy.kelondro.data.meta.DigestURI.canRead()

        String[] s = start.list();
        DigestURI w;
        for (String t: s) {
            try {
                w = new DigestURI(start, t);
                if (w.canRead() && !w.isHidden()) {
                    if (w.isDirectory()) {
                        addConcurrent(w);
                    } else {
                        try {
                            this.queue.put(w);
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.