protected class MultipleParcelsHandler.ParcelBuffer
extends java.lang.Object
Constructor and Description |
---|
ParcelBuffer(MultipleParcelsHandler.SmallParcel parcel,
int totalNumber) |
Modifier and Type | Method and Description |
---|---|
int |
addParcel(MultipleParcelsHandler.SmallParcel parcel) |
MultipleParcelsHandler.SmallParcel |
assembleParcels()
[Note] This method should NOT be called if
receivedAllParcels() return false.Assemble all parcels stored in this buffer. |
int |
getTotalParcelNumber() |
boolean |
receivedAllParcels() |
void |
sortBuffer()
We need to sort all the small parcels according to parcel's index
before assembling them. |
public ParcelBuffer(MultipleParcelsHandler.SmallParcel parcel, int totalNumber)
public int addParcel(MultipleParcelsHandler.SmallParcel parcel)
public int getTotalParcelNumber()
public void sortBuffer()
assembleParcels()
assembleParcels()
public boolean receivedAllParcels()
public MultipleParcelsHandler.SmallParcel assembleParcels() throws java.lang.Exception
receivedAllParcels()
return false.MultipleParcelsHandler.SmallParcel
, the assembled parcel containing content of all parcels.java.lang.Exception
receivedAllParcels()
Copyright © SAS Institute. All Rights Reserved.