public abstract class SegmentationPlan extends Object
| Modifier and Type | Field and Description |
|---|---|
protected Long |
currentSegment |
protected Long |
segmentationSize |
| Constructor and Description |
|---|
SegmentationPlan(Long segmentationSize) |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
close()
Closes the underlying File, if appropriate
|
protected abstract InputStream |
createSegment()
Creates an InputStream from the current segment
|
protected boolean |
done()
Checks whether all segments have been done
|
protected abstract Long |
getFileLength()
Returns the file length of the object
|
InputStream |
getNextSegment() |
Long |
getSegmentNumber() |
protected Long segmentationSize
protected Long currentSegment
public SegmentationPlan(Long segmentationSize)
public Long getSegmentNumber()
public InputStream getNextSegment() throws IOException
IOExceptionprotected boolean done()
protected abstract Long getFileLength()
protected abstract InputStream createSegment() throws IOException
IOException - thrown if error occurspublic abstract void close()
throws IOException
IOException - thrown if error occursCopyright © 2012-2016 42 BV. All Rights Reserved.