---
title: "appendBytes(const OSData *)"
framework: kernel
role: pseudoSymbol
path: kernel/osdata/1808058-appendbytes
---

# appendBytes(const OSData *)

Appends the data contained in another OSData object.

## Declaration

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

## Parameters

- `aDataObj`: The OSData object whose contents will be appended.

## Return Value

Return Value true if the new data was successfully added, false on failure.

## Overview

Overview This function immediately resizes the OSData's buffer, if necessary, to accommodate the new total size. An OSData object created "NoCopy" does not allow bytes to be appended.

## See Also

### Miscellaneous

- [appendByte](kernel/osdata/1808052-appendbyte.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 OSData *)](kernel/osdata/1808160-isequalto.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)
