389 {
390
395
413}
static bool writeToFile(const Data *self, const char *path)
static bool isEqual(const Object *self, const Object *other)
static Data * dataWithConstMemory(const ident mem, size_t length)
static void appendData(Data *self, const Data *data)
static Data * dataWithContentsOfFile(const char *path)
static Object * copy(const Object *self)
static Data * initWithData(Data *self, const Data *data)
static Data * dataWithCapacity(size_t capacity)
static Data * dataWithMemory(ident mem, size_t length)
static Data * dataWithBytes(const uint8_t *bytes, size_t length)
ident interface
The interface of the Class.
Data * initWithContentsOfFile(Data *self, const char *path)
Initializes this Data with the contents of the file at path.
Data * initWithMemory(Data *self, ident mem, size_t length)
Initializes this Data, taking ownership of the specified memory.
Data * initWithData(Data *self, const Data *data)
Initializes this Data with the contents of data.
Data * init(Data *self)
Initializes this Data with length 0.
Data * dataWithMemory(ident mem, size_t length)
Returns a new Data, taking ownership of the specified memory.
Data * dataWithContentsOfFile(const char *path)
Returns a new Data with the contents of the file at path.
void appendBytes(Data *self, const uint8_t *bytes, size_t length)
Appends the given bytes to this Data.
Data * initWithCapacity(Data *self, size_t capacity)
Initializes this Data with the given capacity.
void setLength(Data *self, size_t length)
Sets the length of this Data, truncating or expanding it.
Data * initWithConstMemory(Data *self, const ident mem, size_t length)
Initializes this Data with the given const memory.
Data * initWithBytes(Data *self, const uint8_t *bytes, size_t length)
Initializes this Data by copying length of bytes.
Data * dataWithConstMemory(const ident mem, size_t length)
Returns a new Data, backed by the given const memory.
Data * dataWithCapacity(size_t capacity)
Returns a new Data with the given capacity.
void dealloc(Object *self)
Frees all resources held by this Object.