The getBinFile() method is the content-retrieval method for the IGeneratesBinFiles interface. It retrieves generated file objects from the ODA's
generated-content structure, which is the structure that the ODA populated
with the generated file objects. The method that populated the generated-content
structure depends on the content protocol that the ODA supports
for file generation, as follows:
- If the ODA generates files "on request", the generateBinFiles() method has populates the generated-content structure.
- If the ODA generates files through callbacks, some user-defined
method populates the generated-content structure.
The value of the index argument determines
whether to getBinFile() returns one or all generated file objects, as Table 92 shows.
Table 92. Specifying the file objects to return
Value of index argument |
Action of getBinFile() |
In the range 0 to count
(where count is the member variable in the content-metadata object that
specifies the number of file objects in the generated-content structure) |
Return an array that contains one file
(Java(TM) File) object, the File object at the specified index position
in the generated-content structure. |
ODKConstant.GET_ALL_OBJECTS |
Return an array of all generated
file objects in the generated-content structure. |
For more information on how to implement getBinFile(), see Providing access to generated files.