BBjClientFile::getContents

Description

In BBj 7.0 and higher, this method returns the contents of the file this BBjClientFile represents. If the file does not exist, it reports !ERROR=12.

Syntax

Return Value

Method

byte[]

getContents()

Parameters

None.

Return Value

A string containing the contents of the associated file. If the file does not exist, it reports !ERROR=12.

Remarks

Methods that return byte[] can usually be treated as if they returned string, because BBj automatically handles the conversion. However, when that byte[] value is directly assigned to an object variable or passed to a Java method, BBj skips the conversion and the raw internal byte[] format is used. You can always use the STR() function to explicitly convert the byte[] value to a string.

A large file may consume a great deal of memory on the server which can lead to out of memory error conditions. Use this only for small files. BBjClientFile::length returns the size of the file.

BUI logo

See BUI: Interacting with client files for a detailed discussion of the BUI BBjClientFile.

Example

See Also

BBjAPI

BBjThinClient

BBjClientFileSystem

BBjClientFile

See the BBj Object Diagram for an illustration of the relationship between BBj Objects.