Package org.vngx.jsch.exception

Examples of org.vngx.jsch.exception.SftpException


        readResponseOk();
      }
    } catch(SftpException e) {
      throw e;
    } catch(Exception e) {
      throw new SftpException(SSH_FX_FAILURE, "Failed to rmdir path :"+path, e);
    }
  }
View Full Code Here


      sendMKDIR(Util.str2byte(remoteAbsolutePath(path), _fileEncoding), null);
      readResponseOk();
    } catch(SftpException e) {
      throw e;
    } catch(Exception e) {
      throw new SftpException(SSH_FX_FAILURE, "Failed to mkdir path: "+path, e);
    }
  }
View Full Code Here

    try {
      return _stat(isUnique(remoteAbsolutePath(path)));
    } catch(SftpException e) {
      throw e;
    } catch(Exception e) {
      throw new SftpException(SSH_FX_FAILURE, "Failed to stat path: "+path, e);
    }
  }
View Full Code Here

  private SftpATTRS _stat(byte[] path) throws SftpException {
    try {
      sendSTAT(path);
      readResponse();
      if( _header.type != SSH_FXP_ATTRS ) {
        throw new SftpException(SSH_FX_FAILURE, "Invalid FXP response: "+_header.type);
      }
      return SftpATTRS.getATTR(_buffer);
    } catch(SftpException e) {
      throw e;
    } catch(Exception e) {
      throw new SftpException(SSH_FX_FAILURE, "Failed to stat path: "+path, e);
    }
  }
View Full Code Here

    try {
      return _lstat(isUnique(remoteAbsolutePath(path)));
    } catch(SftpException e) {
      throw e;
    } catch(Exception e) {
      throw new SftpException(SSH_FX_FAILURE, "Failed to lstat path: "+path, e);
    }
  }
View Full Code Here

  private SftpATTRS _lstat(String path) throws SftpException {
    try {
      sendLSTAT(Util.str2byte(path, _fileEncoding));
      readResponse();
      if( _header.type != SSH_FXP_ATTRS ) {
        throw new SftpException(SSH_FX_FAILURE, "Invalid FXP response: "+_header.type);
      }
      return SftpATTRS.getATTR(_buffer);
    } catch(SftpException e) {
      throw e;
    } catch(Exception e) {
      throw new SftpException(SSH_FX_FAILURE, "Failed to lstat path: "+path, e);
    }
  }
View Full Code Here

   */
  private byte[] _realpath(String path) throws SftpException, IOException, Exception {
    sendREALPATH(Util.str2byte(path, _fileEncoding));
    readResponse();
    if( _header.type != SSH_FXP_NAME ) {
      throw new SftpException(SSH_FX_FAILURE, "Invalid FXP response: "+_header.type);
    }

    byte[] str = null;
    int count = _buffer.getInt();
    while( count-- > 0 ) {
View Full Code Here

        _setStat(remotePath, attr);
      }
    } catch(SftpException e) {
      throw e;
    } catch(Exception e) {
      throw new SftpException(SSH_FX_FAILURE, "Failed to set stat for path: "+path, e);
    }
  }
View Full Code Here

      sendSETSTAT(Util.str2byte(path, _fileEncoding), attr);
      readResponseOk();
    } catch(SftpException e) {
      throw e;
    } catch(Exception e) {
      throw new SftpException(SSH_FX_FAILURE, "Failed to set stat for path: "+path, e);
    }
  }
View Full Code Here

   * @return server SFTP version
   * @throws SftpException if SFTP channel is not connected
   */
  public int getServerVersion() throws SftpException {
    if( !isConnected() ) {
      throw new SftpException(SSH_FX_FAILURE, "The channel is not connected");
    }
    return _serverVersion;
  }
View Full Code Here

TOP

Related Classes of org.vngx.jsch.exception.SftpException

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.