Represents a fragmentation engine that takes in a large byte array and generates a number of smaller fragment byte arrays. These can be reassembled back into the large byte array using the Resassembler interface.
| Type Params | Return Type | Name and description |
|---|---|---|
|
long |
getDataLength()Gets length of the data array to fragment. |
|
int |
getFragmentCount()Gets the number of fragments already generated by this fragmenter. |
|
int |
getFragmentID()Gets the fragment ID of the next fragment to be generated. |
|
int |
getFragmentLength()Gets length of each fragment. |
|
long |
getMaxDataLength(int fragmentLen)Get the maximum data length that can be supported. |
|
int |
getMaxFragmentCount()Gets the maximum number of fragments that can be generated from the data. |
|
int |
getMinFragmentCount()Gets the minimum number of fragments required to reassemble the data. |
|
boolean |
hasMoreFragments()Checks if more fragments can be generated. |
|
byte[] |
nextFragment()Generates the next fragment. |
|
Fragmenter |
setup(byte[] data, int fragmentLen)Sets up the fragmenter to fragment the given data into smaller fragments of a specified length. |
Gets length of the data array to fragment.
Gets the number of fragments already generated by this fragmenter.
Gets the fragment ID of the next fragment to be generated.
Gets length of each fragment.
Get the maximum data length that can be supported.
fragmentLen - fragment length in bytes.Gets the maximum number of fragments that can be generated from the data.
Gets the minimum number of fragments required to reassemble the data.
Checks if more fragments can be generated.
Generates the next fragment. May return null if there are no more fragments.
Sets up the fragmenter to fragment the given data into smaller fragments of a specified length.
data - byte array containing the large data to be fragmented.fragmentLen - size of each fragment in bytes.