Package net.sf.basedb.util
Class InputStreamTracker.CurvedScaleFactor
- java.lang.Object
-
- net.sf.basedb.util.InputStreamTracker.CurvedScaleFactor
-
- All Implemented Interfaces:
InputStreamTracker.ScaleFactor
- Enclosing class:
- InputStreamTracker
public static class InputStreamTracker.CurvedScaleFactor extends Object implements InputStreamTracker.ScaleFactor
Apply a curved scale factor that has a max upper limit. To begin with each byte is counted as 1, but the the more bytes that are read the scale factor is changed along curved path so that we get closer and closer to the max limit but never over.
-
-
Field Summary
Fields Modifier and Type Field Description private double
max
-
Constructor Summary
Constructors Constructor Description CurvedScaleFactor(long max)
-
-
-
Method Detail
-
scale
public long scale(long numRead)
- Specified by:
scale
in interfaceInputStreamTracker.ScaleFactor
-
-