2 * © 2008 by David ‘Bombe’ Roden <bombe@pterodactylus.net>
8 * A buffer that will grow to accomodate the data being put into it.
15 * Empty constructor. Creates a buffer with a default size of 1024 bytes.
17 * @param initialSize The initial size of the buffer in bytes
19 GrowingBuffer(size_t initialSize = 1024);
22 * Destructor. Frees all used resources.
29 size_t getRemaining();
32 * Sets the position of the buffer. The next {@link read(void*, size_t)} or
33 * {@link write(const void*, size_t)} operation will be applied at the new
36 * @param position The position to seek to
38 void seek(size_t position);
39 void* read(void* buffer, size_t length);
40 void write(const void* buffer, size_t length);
44 void resize(double factor = 1.0);
46 size_t indexOf(char c, size_t start = 0);