Codota Logo
SFTPEngine.doRequest
Code IndexAdd Codota to your IDE (free)

How to use
doRequest
method
in
net.schmizz.sshj.sftp.SFTPEngine

Best Java code snippets using net.schmizz.sshj.sftp.SFTPEngine.doRequest (Showing top 20 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
BufferedReader b =
  • Codota IconInputStream in;new BufferedReader(new InputStreamReader(in))
  • Codota IconReader in;new BufferedReader(in)
  • Codota IconFile file;new BufferedReader(new FileReader(file))
  • Smart code suggestions by Codota
}
origin: hierynomus/sshj

public void remove(String filename)
    throws IOException {
  doRequest(
      newRequest(PacketType.REMOVE).putString(filename, sub.getRemoteCharset())
  ).ensureStatusPacketIsOK();
}
origin: hierynomus/sshj

public void removeDir(String path)
    throws IOException {
  doRequest(
      newRequest(PacketType.RMDIR).putString(path, sub.getRemoteCharset())
  ).ensureStatusIs(Response.StatusCode.OK);
}
origin: hierynomus/sshj

protected FileAttributes stat(PacketType pt, String path)
    throws IOException {
  return doRequest(newRequest(pt).putString(path, sub.getRemoteCharset()))
      .ensurePacketTypeIs(PacketType.ATTRS)
      .readFileAttributes();
}
origin: hierynomus/sshj

public String canonicalize(String path)
    throws IOException {
  return readSingleName(
      doRequest(
          newRequest(PacketType.REALPATH).putString(path, sub.getRemoteCharset())
      ), sub.getRemoteCharset());
}
origin: hierynomus/sshj

public void setAttributes(String path, FileAttributes attrs)
    throws IOException {
  doRequest(
      newRequest(PacketType.SETSTAT).putString(path, sub.getRemoteCharset()).putFileAttributes(attrs)
  ).ensureStatusPacketIsOK();
}
origin: hierynomus/sshj

public void makeDir(String path, FileAttributes attrs)
    throws IOException {
  doRequest(newRequest(PacketType.MKDIR).putString(path, sub.getRemoteCharset()).putFileAttributes(attrs)).ensureStatusPacketIsOK();
}
origin: hierynomus/sshj

public RemoteDirectory openDir(String path)
    throws IOException {
  final byte[] handle = doRequest(
      newRequest(PacketType.OPENDIR).putString(path, sub.getRemoteCharset())
  ).ensurePacketTypeIs(PacketType.HANDLE).readBytes();
  return new RemoteDirectory(this, path, handle);
}
origin: hierynomus/sshj

public String readLink(String path)
    throws IOException {
  if (operativeVersion < 3)
    throw new SFTPException("READLINK is not supported in SFTPv" + operativeVersion);
  return readSingleName(
      doRequest(
          newRequest(PacketType.READLINK).putString(path, sub.getRemoteCharset())
      ), sub.getRemoteCharset());
}
origin: hierynomus/sshj

public void symlink(String linkpath, String targetpath)
    throws IOException {
  if (operativeVersion < 3)
    throw new SFTPException("SYMLINK is not supported in SFTPv" + operativeVersion);
  doRequest(
      newRequest(PacketType.SYMLINK).putString(linkpath, sub.getRemoteCharset()).putString(targetpath, sub.getRemoteCharset())
  ).ensureStatusPacketIsOK();
}
origin: hierynomus/sshj

public void rename(String oldPath, String newPath)
    throws IOException {
  if (operativeVersion < 1)
    throw new SFTPException("RENAME is not supported in SFTPv" + operativeVersion);
  doRequest(
      newRequest(PacketType.RENAME).putString(oldPath, sub.getRemoteCharset()).putString(newPath, sub.getRemoteCharset())
  ).ensureStatusPacketIsOK();
}
origin: hierynomus/sshj

public RemoteFile open(String path, Set<OpenMode> modes, FileAttributes fa)
    throws IOException {
  final byte[] handle = doRequest(
      newRequest(PacketType.OPEN).putString(path, sub.getRemoteCharset()).putUInt32(OpenMode.toMask(modes)).putFileAttributes(fa)
  ).ensurePacketTypeIs(PacketType.HANDLE).readBytes();
  return new RemoteFile(this, path, handle);
}
origin: net.schmizz/sshj

public void setAttributes(String path, FileAttributes attrs)
    throws IOException {
  doRequest(
      newRequest(PacketType.SETSTAT).putString(path).putFileAttributes(attrs)
  ).ensureStatusPacketIsOK();
}
origin: com.hierynomus/sshj

public void removeDir(String path)
    throws IOException {
  doRequest(
      newRequest(PacketType.RMDIR).putString(path, sub.getRemoteCharset())
  ).ensureStatusIs(Response.StatusCode.OK);
}
origin: com.hierynomus/sshj

public void setAttributes(String path, FileAttributes attrs)
    throws IOException {
  doRequest(
      newRequest(PacketType.SETSTAT).putString(path, sub.getRemoteCharset()).putFileAttributes(attrs)
  ).ensureStatusPacketIsOK();
}
origin: net.schmizz/sshj

public void rename(String oldPath, String newPath)
    throws IOException {
  if (operativeVersion < 1)
    throw new SFTPException("RENAME is not supported in SFTPv" + operativeVersion);
  doRequest(
      newRequest(PacketType.RENAME).putString(oldPath).putString(newPath)
  ).ensureStatusPacketIsOK();
}
origin: com.hierynomus/sshj

public RemoteDirectory openDir(String path)
    throws IOException {
  final byte[] handle = doRequest(
      newRequest(PacketType.OPENDIR).putString(path, sub.getRemoteCharset())
  ).ensurePacketTypeIs(PacketType.HANDLE).readBytes();
  return new RemoteDirectory(this, path, handle);
}
origin: com.hierynomus/sshj

public String readLink(String path)
    throws IOException {
  if (operativeVersion < 3)
    throw new SFTPException("READLINK is not supported in SFTPv" + operativeVersion);
  return readSingleName(
      doRequest(
          newRequest(PacketType.READLINK).putString(path, sub.getRemoteCharset())
      ), sub.getRemoteCharset());
}
origin: com.hierynomus/sshj

public void symlink(String linkpath, String targetpath)
    throws IOException {
  if (operativeVersion < 3)
    throw new SFTPException("SYMLINK is not supported in SFTPv" + operativeVersion);
  doRequest(
      newRequest(PacketType.SYMLINK).putString(linkpath, sub.getRemoteCharset()).putString(targetpath, sub.getRemoteCharset())
  ).ensureStatusPacketIsOK();
}
origin: com.hierynomus/sshj

public void rename(String oldPath, String newPath)
    throws IOException {
  if (operativeVersion < 1)
    throw new SFTPException("RENAME is not supported in SFTPv" + operativeVersion);
  doRequest(
      newRequest(PacketType.RENAME).putString(oldPath, sub.getRemoteCharset()).putString(newPath, sub.getRemoteCharset())
  ).ensureStatusPacketIsOK();
}
origin: net.schmizz/sshj

public RemoteFile open(String path, Set<OpenMode> modes, FileAttributes fa)
    throws IOException {
  final String handle = doRequest(
      newRequest(PacketType.OPEN).putString(path).putUInt32(OpenMode.toMask(modes)).putFileAttributes(fa)
  ).ensurePacketTypeIs(PacketType.HANDLE).readString();
  return new RemoteFile(this, path, handle);
}
net.schmizz.sshj.sftpSFTPEnginedoRequest

Popular methods of SFTPEngine

  • open
  • makeDir
  • stat
  • <init>
  • canonicalize
  • close
  • getOperativeProtocolVersion
  • getPathHelper
  • getSubsystem
  • init
  • lstat
  • openDir
  • lstat,
  • openDir,
  • readLink,
  • remove,
  • removeDir,
  • rename,
  • request,
  • setAttributes,
  • symlink

Popular in Java

  • Making http requests using okhttp
  • scheduleAtFixedRate (ScheduledExecutorService)
  • startActivity (Activity)
  • getResourceAsStream (ClassLoader)
    Returns a stream for the resource with the specified name. See #getResource(String) for a descriptio
  • VirtualMachine (com.sun.tools.attach)
    A Java virtual machine. A VirtualMachine represents a Java virtual machine to which this Java vir
  • FileReader (java.io)
    A specialized Reader that reads from a file in the file system. All read requests made by calling me
  • Collection (java.util)
    Collection is the root of the collection hierarchy. It defines operations on data collections and t
  • LinkedList (java.util)
    Doubly-linked list implementation of the List and Dequeinterfaces. Implements all optional list oper
  • Vector (java.util)
    The Vector class implements a growable array of objects. Like an array, it contains components that
  • HttpServlet (javax.servlet.http)
    Provides an abstract class to be subclassed to create an HTTP servlet suitable for a Web site. A sub
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now