---
title: "isEqualTo(const OSData *)"
framework: kernel
role: pseudoSymbol
path: kernel/osdata/1808160-isequalto
---

# isEqualTo(const OSData *)

Tests the equality of two OSData objects.

## Declaration

```occ
virtual bool isEqualTo(
 const OSData *aDataObj) const; 
```

## Parameters

- `aDataObj`: The OSData object being compared against the receiver.

## Return Value

Return Value true if the two OSData objects are equivalent, false otherwise.

## Overview

Overview Two OSData objects are considered equal if they have same length and if their byte buffers hold the same contents.

## See Also

### Miscellaneous

- [appendByte](kernel/osdata/1808052-appendbyte.md)
- [appendBytes(const OSData *)](kernel/osdata/1808058-appendbytes.md)
- [appendBytes(const void *, unsigned int)](kernel/osdata/1808067-appendbytes.md)
- [ensureCapacity](kernel/osdata/1808072-ensurecapacity.md)
- [free](kernel/osdata/1808080-free.md)
- [getBytesNoCopy()](kernel/osdata/1808085-getbytesnocopy.md)
- [getBytesNoCopy(unsigned int, unsigned int)](kernel/osdata/1808094-getbytesnocopy.md)
- [getCapacity](kernel/osdata/1808100-getcapacity.md)
- [getCapacityIncrement](kernel/osdata/1808106-getcapacityincrement.md)
- [getLength](kernel/osdata/1808111-getlength.md)
- [initWithBytes](kernel/osdata/1808118-initwithbytes.md)
- [initWithBytesNoCopy](kernel/osdata/1808127-initwithbytesnocopy.md)
- [initWithCapacity](kernel/osdata/1808134-initwithcapacity.md)
- [initWithData(const OSData *)](kernel/osdata/1808141-initwithdata.md)
- [initWithData(const OSData *, unsigned int, unsigned int)](kernel/osdata/1808150-initwithdata.md)
- [isEqualTo(const OSMetaClassBase *)](kernel/osdata/1808165-isequalto.md)
- [isEqualTo(const OSString *)](kernel/osdata/1808172-isequalto.md)
- [isEqualTo(const void *, unsigned int)](kernel/osdata/1808178-isequalto.md)
- [serialize](kernel/osdata/1808185-serialize.md)
- [setCapacityIncrement](kernel/osdata/1808190-setcapacityincrement.md)
- [withBytes](kernel/osdata/1808195-withbytes.md)
- [withBytesNoCopy](kernel/osdata/1808197-withbytesnocopy.md)
- [withCapacity](kernel/osdata/1808204-withcapacity.md)
- [withData(const OSData *)](kernel/osdata/1808208-withdata.md)
- [withData(const OSData *, unsigned int, unsigned int)](kernel/osdata/1808211-withdata.md)
