Package org.apache.oodt.cas.pushpull.exceptions

Examples of org.apache.oodt.cas.pushpull.exceptions.ProtocolException


        }
      };
      sftpChannel.get(file.getProtocolPath().getPathString(), toLocalFile
          .getAbsolutePath());
    } catch (Exception e) {
      throw new ProtocolException("Failed to download " + file + " : "
          + e.getMessage());
    }
  }
View Full Code Here


            new ProtocolPath(path + "/" + sftpFile.getFilename(), sftpFile
                .getAttrs().isDir())));
      }
      return returnFiles;
    } catch (Exception e) {
      throw new ProtocolException("Failed to get file list : " + e.getMessage());
    }
  }
View Full Code Here

  public ProtocolFile getCurrentWorkingDir() throws ProtocolException {
    try {
      return new ProtocolFile(this.getRemoteSite(), new ProtocolPath(
          sftpChannel.pwd(), true));
    } catch (Exception e) {
      throw new ProtocolException("Failed to pwd : " + e.getMessage());
    }
  }
View Full Code Here

  @Override
  public synchronized void cdToRoot() throws ProtocolException {
    try {
      chDir(new ProtocolPath("/", true));
    } catch (Exception e) {
      throw new ProtocolException("Failed to cd to root : " + e.getMessage());
    }
  }
View Full Code Here

        currentFolder = store.getDefaultFolder();
      }
      this.incrementConnections();
    } catch (Exception e) {
      e.printStackTrace();
      throw new ProtocolException("Failed to connected to IMAPS server " + host
          + " with username " + username + " : " + e.getMessage());
    }
  }
View Full Code Here

          break;
        }
      }
    } catch (Exception e) {
      e.printStackTrace();
      throw new ProtocolException("Failed to download " + file + " to "
          + toLocalFile + " : " + e.getMessage());
    } finally {
      try {
        closeFolder(currentFolder);
      } catch (Exception e) {
View Full Code Here

        }
      }
      // changedDir = false;
    } catch (Exception e) {
      if (!currentFolder.getFullName().equals(""))
        throw new ProtocolException("Failed to ls");
    } finally {
      try {
        closeFolder(currentFolder);
      } catch (Exception e) {
      }
View Full Code Here

      String pwd = this.currentFolder.getFullName();
      if (!pwd.equals("") && !pwd.startsWith("/"))
        pwd = "/" + pwd;
      return new ProtocolFile(this.getRemoteSite(), new ProtocolPath(pwd, true));
    } catch (Exception e) {
      throw new ProtocolException("Failed to pwd : " + e.getMessage());
    }
  }
View Full Code Here

        folder.open(Folder.READ_WRITE);
      } catch (Exception e) {
        try {
          folder.open(Folder.READ_ONLY);
        } catch (Exception e2) {
          throw new ProtocolException("Failed to open folder : "
              + e.getMessage() + " : " + e2.getMessage());
        }
      }
    }
    openCalls++;
View Full Code Here

            long position = 0;
            while (position < size)
                position += inChannel
                        .transferTo(position, maxCount, outChannel);
        } catch (Exception e) {
            throw new ProtocolException("Failed to get file '" + file + "' : "
                    + e.getMessage());
        } finally {
            try {
                if (inChannel != null)
                    inChannel.close();
View Full Code Here

TOP

Related Classes of org.apache.oodt.cas.pushpull.exceptions.ProtocolException

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.