Oracle C++ Call Interface Programmer's Guide Release 2 (9.2) Part Number A96583-01 |
|
OCCI Classes and Methods, 4 of 22
Methods of the Bytes
class enable you to perform specific tasks related to Bytes
objects.
To create a Bytes
object, use the syntax:
Bytes(Environment *env = NULL);
To create a Bytes
object that contains a subarray of bytes from a character array, use the syntax:
Bytes(unsigned char *value, unsigned int count, unsigned int offset = 0, Environment *env = NULL);
To create a copy of a Bytes
object, use the syntax:
Bytes(const Bytes &e);
This method returns the byte at the specified position in the Bytes
object.
unsigned char byteAt(unsigned int index) const;
The position of the byte to be returned from the Bytes
object; the first byte of the Bytes
object is at 0.
This method copies bytes from a Bytes
object into the specified byte array.
void getBytes(unsigned char *dst, unsigned int count, unsigned int srcBegin = 0, unsigned int dstBegin = 0) const;
The destination buffer into which data from the Bytes
object is to be written.
The number of bytes to copy.
The starting position at which data is to be read from the Bytes
object; the position of the first byte in the Bytes
object is at 0.
The starting position at which data is to be written in the destination buffer; the position of the first byte in dst
is at 0.
This method tests whether the Bytes
object is atomically null. If the Bytes
object is atomically null, then true is returned; otherwise false is returned.
bool isNull() const;
This method returns the length of the Bytes
object.
unsigned int length() const;
This method sets the Bytes
object to atomically null.
void setNull();
|
Copyright © 2001, 2002 Oracle Corporation. All Rights Reserved. |
|