webkit
2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
|
#include <bytestream.h>
Public Member Functions | |
CheckedArrayByteSink (char *outbuf, int32_t capacity) | |
virtual | ~CheckedArrayByteSink () |
virtual CheckedArrayByteSink & | Reset () |
virtual void | Append (const char *bytes, int32_t n) |
virtual char * | GetAppendBuffer (int32_t min_capacity, int32_t desired_capacity_hint, char *scratch, int32_t scratch_capacity, int32_t *result_capacity) |
int32_t | NumberOfBytesWritten () const |
UBool | Overflowed () const |
int32_t | NumberOfBytesAppended () const |
CheckedArrayByteSink (char *outbuf, int32_t capacity) | |
virtual | ~CheckedArrayByteSink () |
virtual CheckedArrayByteSink & | Reset () |
virtual void | Append (const char *bytes, int32_t n) |
virtual char * | GetAppendBuffer (int32_t min_capacity, int32_t desired_capacity_hint, char *scratch, int32_t scratch_capacity, int32_t *result_capacity) |
int32_t | NumberOfBytesWritten () const |
UBool | Overflowed () const |
int32_t | NumberOfBytesAppended () const |
CheckedArrayByteSink (char *outbuf, int32_t capacity) | |
virtual | ~CheckedArrayByteSink () |
virtual CheckedArrayByteSink & | Reset () |
virtual void | Append (const char *bytes, int32_t n) |
virtual char * | GetAppendBuffer (int32_t min_capacity, int32_t desired_capacity_hint, char *scratch, int32_t scratch_capacity, int32_t *result_capacity) |
int32_t | NumberOfBytesWritten () const |
UBool | Overflowed () const |
int32_t | NumberOfBytesAppended () const |
Public Member Functions inherited from ByteSink | |
ByteSink () | |
virtual | ~ByteSink () |
virtual void | Flush () |
ByteSink () | |
virtual | ~ByteSink () |
virtual void | Flush () |
ByteSink () | |
virtual | ~ByteSink () |
virtual void | Flush () |
Implementation of ByteSink that writes to a flat byte array, with bounds-checking: This sink will not write more than capacity bytes to outbuf. If more than capacity bytes are Append()ed, then excess bytes are ignored, and Overflowed() will return true. Overflow does not cause a runtime error. ICU 4.2
CheckedArrayByteSink::CheckedArrayByteSink | ( | char * | outbuf, |
int32_t | capacity | ||
) |
Constructs a ByteSink that will write to outbuf[0..capacity-1].
outbuf | buffer to write to |
capacity | size of the buffer ICU 4.2 |
|
virtual |
Destructor. ICU 4.2
CheckedArrayByteSink::CheckedArrayByteSink | ( | char * | outbuf, |
int32_t | capacity | ||
) |
Constructs a ByteSink that will write to outbuf[0..capacity-1].
outbuf | buffer to write to |
capacity | size of the buffer ICU 4.2 |
|
virtual |
Destructor. ICU 4.2
CheckedArrayByteSink::CheckedArrayByteSink | ( | char * | outbuf, |
int32_t | capacity | ||
) |
Constructs a ByteSink that will write to outbuf[0..capacity-1].
outbuf | buffer to write to |
capacity | size of the buffer ICU 4.2 |
|
virtual |
Destructor. ICU 4.2
Append "bytes[0,n-1]" to this.
bytes | the pointer to the bytes |
n | the number of bytes; must be non-negative ICU 4.2 |
Implements ByteSink.
Append "bytes[0,n-1]" to this.
bytes | the pointer to the bytes |
n | the number of bytes; must be non-negative ICU 4.2 |
Implements ByteSink.
Append "bytes[0,n-1]" to this.
bytes | the pointer to the bytes |
n | the number of bytes; must be non-negative ICU 4.2 |
Implements ByteSink.
|
virtual |
Returns a writable buffer for appending and writes the buffer's capacity to *result_capacity. For details see the base class documentation.
min_capacity | required minimum capacity of the returned buffer; must be non-negative |
desired_capacity_hint | desired capacity of the returned buffer; must be non-negative |
scratch | default caller-owned buffer |
scratch_capacity | capacity of the scratch buffer |
result_capacity | pointer to an integer which will be set to the capacity of the returned buffer |
Reimplemented from ByteSink.
|
virtual |
Returns a writable buffer for appending and writes the buffer's capacity to *result_capacity. For details see the base class documentation.
min_capacity | required minimum capacity of the returned buffer; must be non-negative |
desired_capacity_hint | desired capacity of the returned buffer; must be non-negative |
scratch | default caller-owned buffer |
scratch_capacity | capacity of the scratch buffer |
result_capacity | pointer to an integer which will be set to the capacity of the returned buffer |
Reimplemented from ByteSink.
|
virtual |
Returns a writable buffer for appending and writes the buffer's capacity to *result_capacity. For details see the base class documentation.
min_capacity | required minimum capacity of the returned buffer; must be non-negative |
desired_capacity_hint | desired capacity of the returned buffer; must be non-negative |
scratch | default caller-owned buffer |
scratch_capacity | capacity of the scratch buffer |
result_capacity | pointer to an integer which will be set to the capacity of the returned buffer |
Reimplemented from ByteSink.
|
inline |
Returns the number of bytes appended to the sink. If Overflowed() then NumberOfBytesAppended()>NumberOfBytesWritten() else they return the same number.
|
inline |
Returns the number of bytes appended to the sink. If Overflowed() then NumberOfBytesAppended()>NumberOfBytesWritten() else they return the same number.
|
inline |
Returns the number of bytes appended to the sink. If Overflowed() then NumberOfBytesAppended()>NumberOfBytesWritten() else they return the same number.
|
inline |
Returns the number of bytes actually written to the sink.
|
inline |
Returns the number of bytes actually written to the sink.
|
inline |
Returns the number of bytes actually written to the sink.
|
inline |
Returns true if any bytes were discarded, i.e., if there was an attempt to write more than 'capacity' bytes.
|
inline |
Returns true if any bytes were discarded, i.e., if there was an attempt to write more than 'capacity' bytes.
|
inline |
Returns true if any bytes were discarded, i.e., if there was an attempt to write more than 'capacity' bytes.
|
virtual |
Returns the sink to its original state, without modifying the buffer. Useful for reusing both the buffer and the sink for multiple streams. Resets the state to NumberOfBytesWritten()=NumberOfBytesAppended()=0 and Overflowed()=FALSE.
|
virtual |
Returns the sink to its original state, without modifying the buffer. Useful for reusing both the buffer and the sink for multiple streams. Resets the state to NumberOfBytesWritten()=NumberOfBytesAppended()=0 and Overflowed()=FALSE.
|
virtual |
Returns the sink to its original state, without modifying the buffer. Useful for reusing both the buffer and the sink for multiple streams. Resets the state to NumberOfBytesWritten()=NumberOfBytesAppended()=0 and Overflowed()=FALSE.