Retrieves the generated file
objects from the generated-content structure.
Syntax
public File[] getBinFile(long index);
Parameters
- index
- Specifies the file object to retrieve from the
generated-content structure.
Exceptions
- ODKException
- Thrown if Business Object Wizard encounters a problem getting
the generated file objects from the generated-content
structure.
Notes
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 87 shows.
Table
87. 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
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.
See also
generateBinFiles(),
getBoDefs()
