18#ifndef _DECAF_NIO_CHARBUFFER_H_
19#define _DECAF_NIO_CHARBUFFER_H_
255 virtual char get(
int index )
const = 0;
An object to which char sequences and values can be appended.
Definition Appendable.h:42
A CharSequence is a readable sequence of char values.
Definition CharSequence.h:36
This interface imposes a total ordering on the objects of each class that implements it.
Definition Comparable.h:33
virtual int remaining() const
Returns the number of elements between the current position and the limit.
Definition Buffer.h:263
virtual int capacity() const
Definition Buffer.h:145
virtual CharBuffer * asReadOnlyBuffer() const =0
Creates a new, read-only char buffer that shares this buffer's content.
CharBuffer & append(const lang::CharSequence *value)
Appends the specified character sequence to this buffer.
virtual bool operator<(const CharBuffer &value) const
virtual bool operator==(const CharBuffer &value) const
virtual char get()=0
Relative get method.
CharBuffer & put(CharBuffer &src)
This method transfers the chars remaining in the given source buffer into this buffer.
virtual std::string toString() const
virtual lang::CharSequence * subSequence(int start, int end) const =0
Creates a new character buffer that represents the specified subsequence of this buffer,...
virtual bool equals(const CharBuffer &value) const
virtual CharBuffer & put(char value)=0
Writes the given char into this buffer at the current position, and then increments the position.
CharBuffer & append(const lang::CharSequence *value, int start, int end)
Appends a subsequence of the specified character sequence to this buffer If value is Null the the str...
virtual char get(int index) const =0
Absolute get method.
CharBuffer & get(std::vector< char > buffer)
Relative bulk get method.
virtual ~CharBuffer()
Definition CharBuffer.h:85
CharBuffer(int capacity)
Creates a CharBuffer object that has its backing array allocated internally and is then owned and del...
char charAt(int index) const
Reads the character at the given index relative to the current position.
static CharBuffer * wrap(std::vector< char > &buffer)
Wraps the passed STL char Vector in a CharBuffer.
int length() const
Returns the length of this character buffer.
Definition CharBuffer.h:320
virtual char * array()=0
Returns the character array that backs this buffer (optional operation).
virtual bool hasArray() const =0
Tells whether or not this buffer is backed by an accessible char array.
virtual int arrayOffset()=0
Returns the offset within this buffer's backing array of the first element of the buffer (optional op...
virtual CharBuffer * slice() const =0
Creates a new CharBuffer whose content is a shared subsequence of this buffer's content.
static CharBuffer * wrap(char *array, int size, int offset, int length)
Wraps the passed buffer with a new CharBuffer.
CharBuffer & append(char value)
Appends the specified character to this buffer.
CharBuffer & get(char *buffer, int size, int offset, int length)
Relative bulk get method.
CharBuffer & put(const char *buffer, int size, int offset, int length)
This method transfers chars into this buffer from the given source array.
CharBuffer & put(std::vector< char > &buffer)
This method transfers the entire content of the given source char array into this buffer.
virtual CharBuffer * duplicate()=0
Creates a new char buffer that shares this buffer's content.
static CharBuffer * allocate(int capacity)
Allocates a new character buffer.
CharBuffer & put(std::string &src, int start, int end)
Relative bulk put method (optional operation).
virtual CharBuffer & put(int index, char value)=0
Writes the given char into this buffer at the given index.
virtual int compareTo(const CharBuffer &value) const
virtual CharBuffer & compact()=0
Compacts this buffer.
virtual int read(CharBuffer *target)
Attempts to read characters into the specified character buffer.
CharBuffer & put(const std::string &src)
Relative bulk put method (optional operation).
#define DECAF_API
Definition Config.h:29
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.
Definition AprPool.h:25