Tabnine Logo
ch.cyberduck.core.io
Code IndexAdd Tabnine to your IDE (free)

How to use ch.cyberduck.core.io

Best Java code snippets using ch.cyberduck.core.io (Showing top 20 results out of 315)

origin: iterate-ch/cyberduck

@Override
public void close() throws IOException {
  super.close();
  buffer.close();
}
origin: iterate-ch/cyberduck

@Override
public void recv(final long bytes) {
  recv += bytes;
  super.recv(bytes);
}
origin: iterate-ch/cyberduck

  @Override
  public ChecksumCompute checksum(final Path file) {
    return ChecksumComputeFactory.get(HashAlgorithm.md5);
  }
}
origin: iterate-ch/cyberduck

  public static ChecksumCompute get(final HashAlgorithm algorithm) {
    switch(algorithm) {
      case md5:
        return new MD5FastChecksumCompute();
      case sha1:
        return new SHA1ChecksumCompute();
      case sha256:
        return new SHA256ChecksumCompute();
      case sha512:
        return new SHA512ChecksumCompute();
      case crc32:
        return new CRC32ChecksumCompute();
      default:
        return new DisabledChecksumCompute();
    }
  }
}
origin: iterate-ch/cyberduck

  @Override
  public Checksum compute(final InputStream in, final TransferStatus status) throws ChecksumException {
    return new Checksum(HashAlgorithm.sha256, Hex.encodeHexString(this.digest("SHA-256",
      this.normalize(in, status))));
  }
}
origin: iterate-ch/cyberduck

  @Override
  public Checksum compute(final InputStream in, final TransferStatus status) throws ChecksumException {
    return new Checksum(HashAlgorithm.sha1, Hex.encodeHexString(this.digest("SHA-1",
      this.normalize(in, status))));
  }
}
origin: iterate-ch/cyberduck

  @Override
  public Checksum compute(final InputStream in, final TransferStatus status) throws ChecksumException {
    return new Checksum(HashAlgorithm.sha512, Hex.encodeHexString(this.digest("SHA-512",
      this.normalize(in, status))));
  }
}
origin: iterate-ch/cyberduck

@Override
public Checksum compute(final InputStream in, final TransferStatus status) throws ChecksumException {
  return new Checksum(HashAlgorithm.md5, Hex.encodeHexString(this.digest("MD5",
    this.normalize(in, status))));
}
origin: iterate-ch/cyberduck

  @Override
  public Checksum compute(final InputStream in, final TransferStatus status) throws ChecksumException {
    return new Checksum(HashAlgorithm.md5, Hex.encodeHexString(this.digest("MD5",
      this.normalize(in, status))));
  }
}
origin: iterate-ch/cyberduck

public StreamGobbler(InputStream is) {
  this.is = is;
  GobblerThread t = new GobblerThread();
  t.setDaemon(true);
  t.start();
}
origin: iterate-ch/cyberduck

  @Override
  public void recv(final long bytes) {
    delegate.recv(bytes);
  }
}
origin: iterate-ch/cyberduck

protected void checkThreshold(final int count) throws IOException {
  if(written >= threshold) {
    this.reset();
    this.flush();
  }
}
origin: iterate-ch/cyberduck

@Override
public void sent(final long bytes) {
  delegate.sent(bytes);
}
origin: iterate-ch/cyberduck

@Override
public void sent(final long bytes) {
  sent += bytes;
  super.sent(bytes);
}
origin: iterate-ch/cyberduck

/**
 * Creates a new bandwidth throttle at the given throttle rate.
 * The default windows size T is used.  The bytes per windows N
 * is calculated from bytesPerSecond.
 *
 * @param bytesPerSecond the limits in bytes (not bits!) per second
 *                       (not milliseconds!)
 */
public BandwidthThrottle(float bytesPerSecond) {
  this.setRate(bytesPerSecond);
}
origin: iterate-ch/cyberduck

@Override
public void write(byte[] buffer) throws IOException {
  this.write(buffer, 0, buffer.length);
}
origin: iterate-ch/cyberduck

  @Override
  public ChecksumCompute checksum(final Path file) {
    return ChecksumComputeFactory.get(HashAlgorithm.md5);
  }
}
origin: iterate-ch/cyberduck

  @Override
  public ChecksumCompute checksum(final Path file) {
    return ChecksumComputeFactory.get(HashAlgorithm.sha256);
  }
}
origin: iterate-ch/cyberduck

@Override
public ChecksumCompute checksum(final Path file) {
  return ChecksumComputeFactory.get(HashAlgorithm.md5);
}
origin: iterate-ch/cyberduck

@Override
public ChecksumCompute checksum(final Path file) {
  return ChecksumComputeFactory.get(HashAlgorithm.sha1);
}
ch.cyberduck.core.io

Most used classes

  • Checksum
  • ChecksumCompute
  • ChecksumComputeFactory
  • DefaultStreamCloser
  • StatusOutputStream
  • HashAlgorithm,
  • StreamCopier,
  • VoidStatusOutputStream,
  • BandwidthThrottle,
  • BufferInputStream,
  • BufferOutputStream,
  • DisabledStreamListener,
  • FileBuffer,
  • StreamGobbler,
  • StreamListener,
  • AbstractChecksumCompute,
  • Buffer,
  • CRC32ChecksumCompute,
  • DelegateStreamListener
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