activemq-cpp-3.4.0

decaf::io::FileDescriptor Class Reference

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>

Inheritance diagram for decaf::io::FileDescriptor:

Public Member Functions

 FileDescriptor ()
virtual ~FileDescriptor ()
void sync ()
 Force any/all buffered data for this FileDescriptor to be flushed to the underlying device.
bool valid ()
 Indicates whether the File Descriptor is valid.

Static Public Attributes

static FileDescriptor in
 A handle to the standard input stream.
static FileDescriptor out
 A handle to the standard output stream.
static FileDescriptor err
 A handle to the standard error stream.

Protected Member Functions

 FileDescriptor (long value, bool readonly)

Protected Attributes

long descriptor
bool readonly

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

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.


The documentation for this class was generated from the following file: