libdap Updated for version 3.21.1
libdap4 is an implementation of OPeNDAP's DAP protocol.
|
#include <fdiostream.h>
Public Member Functions | |
fdoutbuf (int _fd, bool _close) | |
virtual | ~fdoutbuf () |
Protected Member Functions | |
int | flushBuffer () |
virtual int | overflow (int c) |
virtual int | sync () |
virtual std::streamsize | xsputn (const char *s, std::streamsize num) |
Protected Attributes | |
char | buffer [bufferSize] |
bool | close |
int | fd |
Static Protected Attributes | |
static const int | bufferSize = 4096 |
fdoutbuf is a stream buffer specialization designed specifically for files that are referenced using a file descriptor. This class implements a 4k buffer for data and optionally closes the file when the buffer is deleted.
Definition at line 50 of file fdiostream.h.
libdap::fdoutbuf::fdoutbuf | ( | int | _fd, |
bool | _close ) |
Make an instance of fdoutbuf. To write to a file using an open file descriptor, use fdostream instead.
_fd | The open file descriptor |
_close | If true, close the file when the stream buffer is deleted. False by default. |
Definition at line 43 of file fdiostream.cc.
|
virtual |
When deleting the stream buffer, be sure to call sync(). Close the associated file if specified.
Definition at line 47 of file fdiostream.cc.
|
protected |
Definition at line 54 of file fdiostream.cc.
|
protectedvirtual |
Buffer full, write c and all previous characters
Definition at line 64 of file fdiostream.cc.
|
protectedvirtual |
synchronize with file/destination
Definition at line 79 of file fdiostream.cc.
|
protectedvirtual |
write multiple characters
Definition at line 88 of file fdiostream.cc.
|
protected |
Definition at line 55 of file fdiostream.h.
|
staticprotected |
Definition at line 54 of file fdiostream.h.
|
protected |
Definition at line 53 of file fdiostream.h.
|
protected |
Definition at line 52 of file fdiostream.h.