[#BufferedFile] = BufferedFile :mrdocs: Wrapper around an AutoFile& that implements a ring buffer to deserialize from. It guarantees the ability to rewind a given number of bytes. == Synopsis Declared in `<streams.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- class BufferedFile; ---- == Description Will automatically close the file when it goes out of scope if not null. If you need to close the file early, use file.fclose() instead of fclose(file). == Member Functions [cols="1,4"] |=== | Name| Description | xref:BufferedFile/2constructor.adoc[`BufferedFile`] [.small]#[constructor]# | Wrap a source file with a ring buffer of nBufSize bytes, guaranteeing nRewindIn bytes of rewind. | xref:BufferedFile/FindByte.adoc[`FindByte`] | search for a given byte in the stream, and remain positioned on it | xref:BufferedFile/GetPos.adoc[`GetPos`] | return the current reading position | xref:BufferedFile/SetLimit.adoc[`SetLimit`] | prevent reading beyond a certain position no argument removes the limit | xref:BufferedFile/SetPos.adoc[`SetPos`] | rewind to a given reading position | xref:BufferedFile/SkipTo.adoc[`SkipTo`] | Move the read position ahead in the stream to the given position. Use SetPos() to back up in the stream, not SkipTo(). | xref:BufferedFile/eof.adoc[`eof`] | check whether we're at the end of the source file | xref:BufferedFile/operator_rshift.adoc[`operator>>`] | Deserialize an object from the buffered file and return this wrapper. | xref:BufferedFile/read.adoc[`read`] | read a number of bytes |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#