Public Member Functions
| ||CheckedArrayByteSink (char *outbuf, int32_t capacity)|
| ||Constructs a ByteSink that will write to outbuf[0..capacity-1]. |
|virtual ||~CheckedArrayByteSink ()|
| ||Destructor. |
|virtual CheckedArrayByteSink & ||Reset ()|
| ||Returns the sink to its original state, without modifying the buffer. |
|virtual void ||Append (const char *bytes, int32_t n)|
| ||Append "bytes[0,n-1]" to this. |
|virtual char * ||GetAppendBuffer (int32_t min_capacity, int32_t desired_capacity_hint, char *scratch, int32_t scratch_capacity, int32_t *result_capacity)|
| ||Returns a writable buffer for appending and writes the buffer's capacity to *result_capacity. |
|int32_t ||NumberOfBytesWritten () const |
| ||Returns the number of bytes actually written to the sink. |
|UBool ||Overflowed () const |
| ||Returns true if any bytes were discarded, i.e., if there was an attempt to write more than 'capacity' bytes. |
|int32_t ||NumberOfBytesAppended () const |
| ||Returns the number of bytes appended to the sink. |
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
Definition at line 143 of file bytestream.h.