Tabnine Logo
Chunk.length
Code IndexAdd Tabnine to your IDE (free)

How to use
length
method
in
com.owncloud.android.lib.resources.files.Chunk

Best Java code snippets using com.owncloud.android.lib.resources.files.Chunk.length (Showing top 2 results out of 315)

origin: nextcloud/android-library

List<Chunk> checkMissingChunks(List<Chunk> chunks, long length, long chunkSize) {
  List<Chunk> missingChunks = new ArrayList<>();
  long start = 0;
  while (start <= length) {
    Chunk nextChunk = findNextFittingChunk(chunks, start, chunkSize);
    if (nextChunk == null) {
      // create new chunk
      long end;
      if (start + chunkSize <= length) {
        end = start + chunkSize - 1;
      } else {
        end = length;
      }
      missingChunks.add(new Chunk(start, end));
      start = end + 1;
    } else if (nextChunk.start == start) {
      // go to next
      start = start + nextChunk.length();
    } else {
      // fill the gap
      missingChunks.add(new Chunk(start, nextChunk.start - 1));
      start = nextChunk.start;
    }
  }
  return missingChunks;
}
origin: nextcloud/android-library

  raf = new RandomAccessFile(file, "r");
  channel = raf.getChannel();
  entity = new ChunkFromFileChannelRequestEntity(channel, mimeType, chunk.start, chunk.length(), file);
      endString + " size: "  + chunk.length() + ", HTTP result status " + status);
} finally {
  if (channel != null)
com.owncloud.android.lib.resources.filesChunklength

Popular methods of Chunk

  • <init>

Popular in Java

  • Parsing JSON documents to java classes using gson
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • getSystemService (Context)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • Kernel (java.awt.image)
  • BufferedWriter (java.io)
    Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
  • Time (java.sql)
    Java representation of an SQL TIME value. Provides utilities to format and parse the time's represen
  • Stack (java.util)
    Stack is a Last-In/First-Out(LIFO) data structure which represents a stack of objects. It enables u
  • JList (javax.swing)
  • Scheduler (org.quartz)
    This is the main interface of a Quartz Scheduler. A Scheduler maintains a registry of org.quartz.Job
  • Top 12 Jupyter Notebook extensions
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