diff options
author | Andreas Stöckel <astoecke@techfak.uni-bielefeld.de> | 2015-01-01 18:05:29 +0100 |
---|---|---|
committer | Andreas Stöckel <andreas@somweyr.de> | 2015-01-01 18:05:29 +0100 |
commit | 377b7b0213733307927bec9e39c8ccb063e6ba50 (patch) | |
tree | 69013cf4338d246b0a58caa6d2376c928690a255 /src/core/common/CharReader.hpp | |
parent | 1640daaa6d736f20012d4f10a5d3321394eef490 (diff) |
Added readRaw function to CharReader
Diffstat (limited to 'src/core/common/CharReader.hpp')
-rw-r--r-- | src/core/common/CharReader.hpp | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/core/common/CharReader.hpp b/src/core/common/CharReader.hpp index fd3186c..134d9d9 100644 --- a/src/core/common/CharReader.hpp +++ b/src/core/common/CharReader.hpp @@ -38,9 +38,8 @@ namespace ousia { /** * A chunked ring buffer used in CharReader to provide access to an input stream - * with multiple read cursors. The Buffer automatically expands to the - * size of the spanned by the read cursors while reusing already allocated - * memory. + * with multiple read cursors. The Buffer automatically expands to the size of + * the spanned by the read cursors while reusing already allocated memory. */ class Buffer { public: @@ -563,6 +562,16 @@ public: CharReaderFork fork(); /** + * Reads raw data from the CharReader without any processing. Data is always + * read from the read cursor. + * + * @param buf is the target memory buffer. + * @param size is the number of bytes to be read. + * @return the number of bytes read. + */ + size_t readRaw(char *buf, size_t size); + + /** * Returns true if there are no more characters as the stream was * closed. * |