parcel | Clownfish |
class variable | CFISH_BLOB |
struct symbol | cfish_Blob |
class nickname | cfish_Blob |
header file | Clownfish/Blob.h |
Clownfish::Blob – Immutable buffer holding arbitrary bytes.
cfish_Blob* // incremented
cfish_Blob_new(
void *bytes,
size_t size
);
Return a new Blob which holds a copy of the passed-in bytes.
Pointer to an array of bytes.
Size of the array in bytes.
cfish_Blob*
cfish_Blob_init(
cfish_Blob *self,
void *bytes,
size_t size
);
Initialize a Blob which holds a copy of the passed-in bytes.
Pointer to an array of bytes.
Size of the array in bytes.
cfish_Blob* // incremented
cfish_Blob_new_steal(
void *bytes,
size_t size
);
Return a new Blob which assumes ownership of the passed-in bytes.
Pointer to an array of bytes.
Size of the array in bytes.
cfish_Blob*
cfish_Blob_init_steal(
cfish_Blob *self,
void *bytes,
size_t size
);
Initialize a Blob which assumes ownership of the passed-in bytes.
Pointer to an array of bytes.
Size of the array in bytes.
cfish_Blob* // incremented
cfish_Blob_new_wrap(
void *bytes,
size_t size
);
Return a new Blob which wraps an external buffer. The buffer must stay unchanged for the lifetime of the Blob.
Pointer to an array of bytes.
Size of the array in bytes.
cfish_Blob*
cfish_Blob_init_wrap(
cfish_Blob *self,
void *bytes,
size_t size
);
Initialize a Blob which wraps an external buffer. The buffer must stay unchanged for the lifetime of the Blob.
Pointer to an array of bytes.
Size of the array in bytes.
size_t
cfish_Blob_Get_Size(
cfish_Blob *self
);
Return the number of bytes held by the Blob.
char*
cfish_Blob_Get_Buf(
cfish_Blob *self
);
Accessor for raw internal buffer.
bool
cfish_Blob_Equals(
cfish_Blob *self,
cfish_Obj *other
);
Equality test.
Returns: true if other
is a Blob and has the same content as self
.
bool
cfish_Blob_Equals_Bytes(
cfish_Blob *self,
void *bytes,
size_t size
);
Test whether the Blob matches the passed-in bytes.
Pointer to an array of bytes.
Size of the array in bytes.
int32_t
cfish_Blob_Compare_To(
cfish_Blob *self,
cfish_Obj *other
);
Indicate whether one Blob is less than, equal to, or greater than
another. The byte contents of the Blobs are compared
lexicographically. Throws an exception if other
is not a Blob.
Returns: 0 if the Blobs are equal, a negative number if self
is less
than other
, and a positive number if self
is greater than other
.
cfish_Blob* // incremented
cfish_Blob_Clone(
cfish_Blob *self
);
Return a clone of the object.
Clownfish::Blob is a Clownfish::Obj.
Copyright © 2010-2015 The Apache Software Foundation, Licensed under the
Apache License, Version 2.0.
Apache Lucy, Lucy, Apache, the Apache feather logo, and the Apache Lucy project logo are trademarks of The
Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their
respective owners.