18#ifndef _LOG4CXX_HELPERS_BYTEBUFFER_H
19#define _LOG4CXX_HELPERS_BYTEBUFFER_H
21#include <log4cxx/log4cxx.h>
43 LOG4CXX_DECLARE_PRIVATE_MEMBER_PTR(ByteBufferPriv, m_priv)
77#if LOG4CXX_ABI_VERSION <= 15
83 [[ deprecated(
"Use flip instead" ) ]]
94#if LOG4CXX_ABI_VERSION <= 15
99 [[ deprecated(
"Use increment_position instead" ) ]]
size_t position() const
The offset of the current cursor from the start of the memory area.
void clear()
Set the cursor to the start of the memory area and use the capacity as the extent to which the cursor...
bool put(char byteValue)
Store byteValue at the cursor position and advance the cursor position unless the cursor cannot advan...
size_t remaining() const
The number of bytes from the current cursor until the cursor can no longer advance.
const char * data() const
The start of the memory area.
size_t increment_position(size_t byteCount)
Advance the cursor by byteCount if that does not exceed the extent to which the cursor can advance,...
void limit(size_t newLimit)
Use newLimit as the extent to which the cursor can advance.
char * current()
The memory at the cursor position.
size_t limit() const
The extent to which the cursor can advance as an offset from the start of the memory area.
const char * current() const
The memory at the cursor position.
ByteBuffer(char *data, size_t capacity)
A capacity sized area of memory at data.
void position(size_t newPosition)
Use newPosition as the cursor position providing it is less than the extent to which the cursor can a...
void flip()
Set the extent to which the cursor can advance, limit(), to the current cursor position and move the ...
char * data()
The start of the memory area.
void carry()
Move the remaining bytes to the start of the memory area and set the cursor to the end of the those b...