Skip Headers
Oracle® C++ Call Interface Programmer's Guide,
11g Release 2 (11.2)

Part Number E10764-02
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub
LNCPP1005

Bytes Class

Methods of the Bytes class enable you to perform specific tasks related to Bytes objects.

LNCPP20688Table 13-9 Summary of Bytes Methods

Method Summary

Bytes()

Bytes class constructor.

byteAt()

Returns the byte at the specified position of the Bytes object.

getBytes()

Returns a byte array from the Bytes object.

isNull()

Tests whether the Bytes object is NULL.

length()

Returns the number of bytes in the Bytes object.

operator=()

Assignment operator for Bytes class.

setNull()

Sets the Bytes object to NULL.


LNCPP20689

Bytes()

Bytes class constructor.

Syntax Description
Bytes(
   Environment *env = NULL);
Creates a Bytes object.
Bytes(
   unsigned char *value,
   unsigned int count
   unsigned int offset = 0,
   const Environment *env = NULL);
Creates a Bytes object that contains a subarray of bytes from a character array.
Bytes(
   const Bytes &e);
Creates a copy of a Bytes object, use the syntax

Parameter Description
env
Environment
value
Initial value of the new object
count
The size of the subset of the character array that is copied into the new bytes object
offset
The first position from which to begin copying the character array
e
The source Bytes object.

LNCPP20690

byteAt()

Returns the byte at the specified position in the Bytes object.

LNCPP20691Syntax

unsigned char byteAt(
   unsigned int index) const;
Parameter Description
index
The position of the byte to be returned from the Bytes object; the first byte of the Bytes object is at 0.

LNCPP20692

getBytes()

Copies bytes from a Bytes object into the specified byte array.

LNCPP20693Syntax

void getBytes(
   unsigned char *dst,
   unsigned int count,
   unsigned int srcBegin = 0,
   unsigned int dstBegin = 0) const;
Parameter Description
dst
The destination buffer into which data from the Bytes object is to be written.
count
The number of bytes to copy.
srcBegin
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.
dstBegin
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.

LNCPP20694

isNull()

Tests whether the Bytes object is atomically NULL. If the Bytes object is atomically NULL, then TRUE is returned; otherwise FALSE is returned.

LNCPP20695Syntax

bool isNull() const;
LNCPP20696

length()

This method returns the length of the Bytes object.

LNCPP20697Syntax

unsigned int length() const;
LNCPP20698

operator=()

Assignment operator for Bytes class.

LNCPP20699Syntax

void operator=(
   const Bytes& bytes); 
Parameter Description
bytes
The original Bytes.

LNCPP20700

setNull()

This method sets the Bytes object to atomically NULL.

LNCPP20701Syntax

void setNull();
Reader Comment

   

Comments, corrections, and suggestions are forwarded to authors every week. By submitting, you confirm you agree to the terms and conditions. Use the OTN forums for product questions. For support or consulting, file a service request through My Oracle Support.

Hide Navigation

Quick Lookup

Database Library · Master Index · Master Glossary · Book List · Data Dictionary · SQL Keywords · Initialization Parameters · Advanced Search · Error Messages

Main Categories

This Page

This Document

New and changed documents:
RSS Feed HTML RSS Feed PDF