DataType (Micro Focus COBOL Java Class Library)
Keywords: com.microfocus.cobol.lang.DataType interface

Overview | Package | Class | Use | Tree | Serialized | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.microfocus.cobol.lang
Interface DataType

All Known Subinterfaces:
  DataType

All Known Implementing Classes:
  CobolBigDecimal, CobolBigInteger, CobolDate, CobolNational, CobolRecord, CobolTime, Comp3, DataTypeArray, Pointer, Pointer

public interface DataType

Interface for creatinng user defined COBOL datatypes

Copyright: Copyright (c) 2002-2003
Company: Micro Focus International Ltd

Since:
  Net Express 4.0, Server Express 4.0
  The mapping in the Java programming for user defined COBOL Datatypes is performed by implementing the Datatype interface.
  The COBOL Runtime will invoke the getBytes() method to find its COBOL representation and pass it "by reference" into the COBOL program. Once the COBOL program has returned to the Runtime support, the synchronizeData() method is called. This allows the Java class time to synchronize the COBOL representation with any private fields contained within the class instance.
  For a working example, see the RecordDemo in the demos directory of your COBOL product.
Version:
  3.9, 2/4/03
See Also:
  `Pointer`

Method Summary
`byte[]` | `getBytes()` getBytes() is a callback method that is called from the COBOL Runtime to access the byte[] representation of the Java instance.
`void` | `synchronizeData()` synchronizeData() is a callback method that allows a user defined Java COBOL datatype class to synchronize its internal fields with the updated byte[] representation.

Method Detail

### getBytes

    public byte[] getBytes()
                    throws CobolException,
                           Exception

  getBytes() is a callback method that is called from the COBOL Runtime to access the byte[] representation of the Java instance.

  Returns:
    byte[] of the Java instance
  Throws:
    `CobolException`
    `Exception`

### synchronizeData

    public void synchronizeData()
                         throws CobolException,
                                Exception

  synchronizeData() is a callback method that allows a user defined Java COBOL datatype class to synchronize its internal fields with the updated byte[] representation.

  Throws:
    `CobolException`
    `Exception`

Overview | Package | Class | Use | Tree | Serialized | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright ? 2000 Micro Focus International Limited. All rights reserved.
This document and the proprietary marks and names used herein are protected by international law.