Package org.yamcs.cfdp
Class DataFile
- java.lang.Object
-
- org.yamcs.cfdp.DataFile
-
public class DataFile extends Object
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddSegment(DataFileSegment newseg)longendOfFileOffset()return end of the last segment or -1 if not knownlonggetChecksum()byte[]getData()List<SegmentRequest>getMissingChunks()List<SegmentRequest>getMissingChunks(boolean includeEnd)Returns the missing data segments.longgetReceivedSize()longgetSize()booleanisComplete()voidsetSize(long size)
-
-
-
Method Detail
-
addSegment
public void addSegment(DataFileSegment newseg)
-
getMissingChunks
public List<SegmentRequest> getMissingChunks()
-
getMissingChunks
public List<SegmentRequest> getMissingChunks(boolean includeEnd)
Returns the missing data segments.includeEnd = false is used when the file has been partially transfer to not return a segment covering the end of the file
- Parameters:
includeEnd-- Returns:
-
getReceivedSize
public long getReceivedSize()
-
getData
public byte[] getData()
-
isComplete
public boolean isComplete()
- Returns:
- true if all the data has been received. If size is not known return false.
-
getChecksum
public long getChecksum()
-
endOfFileOffset
public long endOfFileOffset()
return end of the last segment or -1 if not known- Returns:
-
setSize
public void setSize(long size)
-
getSize
public long getSize()
-
-