Package org.springframework.core

Examples of org.springframework.core.NestedIOException


      SmbFile smbDir = createSmbDirectoryObject(_path);
      if (!smbDir.exists()) {
        logger.warn("Remote directory [" + _path + "] does not exist. Cannot list resources.");
        return files;
      } else if (!smbDir.isDirectory()) {
        throw new NestedIOException("Resource [" + _path + "] is not a directory. Cannot list resources.");
      }

      files = smbDir.listFiles();

    } catch (SmbException _ex) {
      throw new NestedIOException("Failed to list resources in [" + _path + "].", _ex);
    }
    String msg = "Successfully listed " + files.length + " resource(s) in [" + _path + "]";
    if (logger.isDebugEnabled()) {
      logger.debug(msg + ": " + Arrays.toString(files));
    } else {
View Full Code Here


    try {

      SmbFile remoteFile = createSmbFileObject(_path);
      if (!remoteFile.isFile()) {
        throw new NestedIOException("Resource [" + _path + "] is not a file.");
      }
      FileCopyUtils.copy(remoteFile.getInputStream(), _outputStream);

    } catch (SmbException _ex) {
      throw new NestedIOException("Failed to read resource [" + _path + "].", _ex);
    }
    logger.info("Successfully read resource [" + _path + "].");
  }
View Full Code Here

        FileCopyUtils.copy(_inputStream, targetFile.getOutputStream());

      }

    } catch (SmbException _ex) {
      throw new NestedIOException("Failed to write resource [" + _path + "].", _ex);
    }
    logger.info("Successfully wrote remote file [" + _path + "].");
  }
View Full Code Here

      } else {
        logger.info("Remote directory [" + _path + "] exists in share [" + smbShare + "].");
      }
      return true;
    } catch (SmbException _ex) {
      throw new NestedIOException("Failed to create directory [" + _path + "].", _ex);
    }
  }
View Full Code Here

        smbFileTo.delete();
      }
      smbFileFrom.renameTo(smbFileTo);

    } catch (SmbException _ex) {
      throw new NestedIOException("Failed to rename [" + _pathFrom + "] to [" + _pathTo + "].", _ex);
    }
    logger.info("Successfully renamed remote resource [" + _pathFrom + "] to [" + _pathTo + "].");

  }
View Full Code Here

TOP

Related Classes of org.springframework.core.NestedIOException

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.