YAACC - UPNP Client and Server
Loading...
Searching...
No Matches
de.yaacc.share.CopyBudget Class Reference

The stop rule of the copy fallback (a provider file whose descriptor cannot seek is copied to the app's incoming directory). More...

Collaboration diagram for de.yaacc.share.CopyBudget:
Collaboration graph

Classes

enum  Decision
 What the copy loop does next. More...
 

Static Public Member Functions

static Decision decide (long bytesSoFar, long declaredSize, long usableSpaceBytes)
 

Detailed Description

The stop rule of the copy fallback (a provider file whose descriptor cannot seek is copied to the app's incoming directory).

Plain Java. The copy loop asks before it writes each chunk, passing the number of bytes the file will have once that chunk is written, and the free space it just read from the volume.

The bytes already written are already gone from the usable space the caller reads, so they are not counted twice.

Member Function Documentation

◆ decide()

static Decision de.yaacc.share.CopyBudget.decide ( long bytesSoFar,
long declaredSize,
long usableSpaceBytes )
static
Parameters
bytesSoFarbytes the copy will hold including the chunk about to be written
declaredSizethe size the provider declared, negative for unknown
usableSpaceBytesthe free space on the volume right now

Referenced by de.yaacc.share.BudgetedCopier.copy().

Here is the caller graph for this function:

The documentation for this class was generated from the following file: