Package com.orbbec.obsensor

## Class DataType

- java.lang.Object
- - com.orbbec.obsensor.DataType

Direct Known Subclasses:
  `CameraDistortion`, `CameraIntrinsic`, `CompressionParams`, `D2CTransform`, `DeviceTemperature`, `ExposureThresholdControl`, `OBRect`

    public abstract class DataType
    extends java.lang.Object

Data type base class, used to represent the type of Native structure mapped to Java

### Constructor Summary

Constructors
`DataType()`

### Method Summary

All Methods Instance Methods Abstract Methods Concrete Methods
`abstract int` `BYTES()` Get the number of bytes occupied by the Native structure
`boolean` `checkInitialized()` Check whether the corresponding Java class is initialized successfully
`protected byte[]` `getBytes()` Get the memory required by the Native structure
`protected boolean` `parseBytes()` Parse the content of the Native structure and initialize the mapped Java class
`protected abstract boolean` `parseBytesImpl​(byte[] bytes)` Specific class implementation parsing, pay attention to the internal order and length of the structure
`protected void` `throwInitializeException()` If not initialized, throw an exception
`protected boolean` `wrapBytes()` Encapsulate the properties in the Java object as a Byte array to map to the structure corresponding to Native
`protected abstract boolean` `wrapBytesImpl​(byte[] bytes)` Specific class attribute encapsulation, pay attention to the internal order and length of the structure

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### DataType

    public DataType()

### Method Detail

#### getBytes

    protected byte[] getBytes()

Get the memory required by the Native structure

Returns:
  The memory required by the Native structure

#### BYTES

    public abstract int BYTES()

Get the number of bytes occupied by the Native structure

Returns:
  The number of bytes occupied by the Native structure

#### parseBytes

    protected boolean parseBytes()

Parse the content of the Native structure and initialize the mapped Java class

Returns:
  true, parsing succeeded; false , parsing failed

#### wrapBytes

    protected boolean wrapBytes()

Encapsulate the properties in the Java object as a Byte array to map to the structure corresponding to Native

Returns:
  true, wrapping succeeded; false, wrapping failed

#### parseBytesImpl

    protected abstract boolean parseBytesImpl​(byte[] bytes)

Specific class implementation parsing, pay attention to the internal order and length of the structure

Parameters:
  `bytes` - byte array to be parsed
Returns:
  Parsing result, false: parsing failed, true: parsing succeeded

#### wrapBytesImpl

    protected abstract boolean wrapBytesImpl​(byte[] bytes)

Specific class attribute encapsulation, pay attention to the internal order and length of the structure

Parameters:
  `bytes` - The generated byte array to be encapsulated
Returns:
  Encapsulation result, false: Encapsulation failed, true: Encapsulation succeeded

#### checkInitialized

    public boolean checkInitialized()

Check whether the corresponding Java class is initialized successfully

Returns:
  Whether the Java class is initialized, false: failure, true: success

#### throwInitializeException

    protected void throwInitializeException()

If not initialized, throw an exception