This class servers as an opaque wrapper around an underlying OS level resource that can be used as a source / sink for byte level data such as sockets and files.
More...
#include <src/main/decaf/io/FileDescriptor.h>
Detailed Description
This class servers as an opaque wrapper around an underlying OS level resource that can be used as a source / sink for byte level data such as sockets and files.
- Since
- 1.0
Constructor & Destructor Documentation
decaf::io::FileDescriptor::FileDescriptor |
( |
long |
value, |
|
|
bool |
readonly |
|
) |
| |
|
protected |
decaf::io::FileDescriptor::FileDescriptor |
( |
| ) |
|
virtual decaf::io::FileDescriptor::~FileDescriptor |
( |
| ) |
|
|
virtual |
Member Function Documentation
void decaf::io::FileDescriptor::sync |
( |
| ) |
|
Force any/all buffered data for this FileDescriptor to be flushed to the underlying device.
This method blocks until all data is flushed to the underlying device and is used to place the device into a known state. In the case of data that is buffered at a higher level such as a BufferedOutputStream the stream must first be flushed before this method can force the data to be sent to the output device.
bool decaf::io::FileDescriptor::valid |
( |
| ) |
|
Indicates whether the File Descriptor is valid.
- Returns
- true for a valid descriptor such as open socket or file, false otherwise.
Field Documentation
long decaf::io::FileDescriptor::descriptor |
|
protected |
A handle to the standard error stream.
Usually, this file descriptor is not used directly, but rather via the output stream known as System::err.
A handle to the standard input stream.
Usually, this file descriptor is not used directly, but rather via the input stream known as System::in.
A handle to the standard output stream.
Usually, this file descriptor is not used directly, but rather via the output stream known as System::out.
bool decaf::io::FileDescriptor::readonly |
|
protected |
The documentation for this class was generated from the following file: