Tabnine Logo
SftpFileObject.getContent
Code IndexAdd Tabnine to your IDE (free)

How to use
getContent
method
in
org.apache.commons.vfs2.provider.sftp.SftpFileObject

Best Java code snippets using org.apache.commons.vfs2.provider.sftp.SftpFileObject.getContent (Showing top 5 results out of 315)

origin: org.apache.commons/commons-vfs2

  @Override
  public long length() throws IOException {
    return fileObject.getContent().getSize();
  }
}
origin: com.github.abashev/commons-vfs2

  @Override
  public long length() throws IOException {
    return fileObject.getContent().getSize();
  }
}
origin: org.jetbrains.intellij.deps/commons-vfs2

  @Override
  public long length() throws IOException
  {
    return fileObject.getContent().getSize();
  }
}
origin: apache/commons-vfs

  @Override
  public long length() throws IOException {
    return fileObject.getContent().getSize();
  }
}
origin: otros-systems/otroslogviewer

public static void checkForSftpLinks(FileObject[] files, TaskContext taskContext) {
 LOGGER.debug("Checking for SFTP links");
 taskContext.setMax(files.length);
 long ts = System.currentTimeMillis();
 for (int i = 0; i < files.length && !taskContext.isStop(); i++) {
  FileObject fileObject = files[i];
  try {
   if (fileObject instanceof SftpFileObject && FileType.FILE.equals(fileObject.getType())) {
    SftpFileObject sftpFileObject = (SftpFileObject) fileObject;
    long size = sftpFileObject.getContent().getSize();
    if (size < SYMBOLIC_LINK_MAX_SIZE && size != 0) {
     if (!pointToItself(sftpFileObject)) {
      files[i] = new LinkFileObject(sftpFileObject);
     }
    }
   }
  } catch (Exception e) {
   //ignore
  } finally {
   taskContext.setCurrentProgress(i);
  }
 }
 long checkDuration = System.currentTimeMillis() - ts;
 LOGGER.info("Checking SFTP links took {} ms [{}ms/file]", checkDuration, (float) checkDuration / files.length);
}
org.apache.commons.vfs2.provider.sftpSftpFileObjectgetContent

Popular methods of SftpFileObject

  • getPermissions
    Returns the POSIX type permissions of the file.
  • <init>
  • flushStat
  • getAbstractFileSystem
  • getFileSystem
  • getInputStream
    Creates an input stream to read the file content from. The input stream is starting at the given pos
  • getName
  • getType
  • isFile
  • setStat
    Set attrs from listChildrenResolved
  • statSelf
    Fetches file attributes from server.
  • doIsReadable
  • statSelf,
  • doIsReadable,
  • doIsWriteable,
  • getLinkDestination

Popular in Java

  • Reactive rest calls using spring rest template
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • getApplicationContext (Context)
  • requestLocationUpdates (LocationManager)
  • Color (java.awt)
    The Color class is used to encapsulate colors in the default sRGB color space or colors in arbitrary
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • BigInteger (java.math)
    An immutable arbitrary-precision signed integer.FAST CRYPTOGRAPHY This implementation is efficient f
  • Calendar (java.util)
    Calendar is an abstract base class for converting between a Date object and a set of integer fields
  • TimerTask (java.util)
    The TimerTask class represents a task to run at a specified time. The task may be run once or repeat
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement. A servlet is a small Java program that runs within
  • Top Vim plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now