| Advanced programming / Mapping native and Java data types | |
When calling a Java™ method with an expression evaluating to a BYTE, the runtime system converts the BYTE handle to an instance of the com.fourjs.fgl.lang.FglByteBlob class implemented in FGLDIR/lib/fgl.jar. You can then manipulate the LOB from within the Java code.
You must add FGLDIR/lib/fgl.jar to the class path in order to compile Java code with com.fourjs.fgl.lang.FglByteBlob class.
The com.fourjs.fgl.lang.FglByteBlob class implements following:
| Method | Description | 
|---|---|
String toString()  | 
Returns the HEX string representing the binary data. | 
static void valueOf( String val)  | 
Creates a new FglByteBlob object from a String object representing the binary data in HEX format. | 
public static void useByte(FglByteBlob b) throws ParseException {
    String s = b.toString();
    ...
}
IMPORT JAVA com.fourjs.fgl.lang.FglByteBlob
MAIN
  DEFINE jbyte com.fourjs.fgl.lang.FglByteBlob
  LET jbyte = FglByteBlob.valueOf("0FA5617BDE")
  DISPLAY jbyte.toString()
END MAIN