SerialPort Class Reference

A class representing a serial communications port. More...

#include <SerialPort.h++>

Inheritance diagram for SerialPort:

Inheritance graph
[legend]
Collaboration diagram for SerialPort:

Collaboration graph
[legend]

List of all members.

Public Types

enum  BaudRate {
  BaudOther = -1, Baud300 = 300, Baud600 = 600, Baud1200 = 1200,
  Baud1800 = 1800, Baud2400 = 2400, Baud4800 = 4800, Baud9600 = 9600,
  Baud19200 = 19200, Baud38400 = 38400, Baud57600 = 57600, Baud115200 = 115200,
  Baud230400 = 230400
}
 Baud rates. More...
enum  Parity {
  ParityOther = -1, ParityNone, ParityOdd, ParityEven,
  ParityMark, ParitySpace
}
 Parity types. More...
enum  DataBits {
  DataBitsOther = -1, DataBits5 = 5, DataBits6 = 6, DataBits7 = 7,
  DataBits8 = 8
}
 Data bits per byte. More...
enum  StopBits { StopBitsOther = -1, StopBits1 = 1, StopBits2 = 2, StopBits15 = 3 }
 Stop bits. More...
enum  FlowControl { FlowOther = -1, FlowOff, FlowHardware, FlowXOnXOff }
 Flow control modes. More...

Public Member Functions

 SerialPort (const String &device)
 Construct a new SerialPort for the given device.
virtual ~SerialPort () throw ()
 Destructor.
virtual void open () throw (IOException)
 Open the serial port connection.
void flush () throw (IOException)
 Flush any pending I/O on the connection.
void setTimeout (int msec) throw (IOException)
 Set the stream I/O timeout, in milliseconds.
void setBaudRate (BaudRate baud) throw (IOException)
 Set the baud rate for the connection.
BaudRate getBaudRate () throw (IOException)
 Get the baud rate for the connection.
void setParity (Parity parity) throw (IOException)
 Set the parity type for the connection.
Parity getParity () throw (IOException)
 Get the parity type for the connection.
void setDataBits (DataBits bits) throw (IOException)
 Set the number of data bits for the connection.
DataBits getDataBits () throw (IOException)
 Get the data bits value for the connection.
void setStopBits (StopBits bits) throw (IOException)
 Set the number of stop bits for the connection.
StopBits getStopBits () throw (IOException)
 Get the stop bits value for the connection.
void setFlowControl (FlowControl flow) throw (IOException)
 Set the flow control mode for the connection.
FlowControl getFlowControl () throw (IOException)
 Get the flow control mode for the connection.
void sendBreak (uint_t duration)
 Send a break on the serial port for the specified amount of time.
virtual size_t read (ByteBuffer &buffer) throw (IOException)
 Read data from the stream into a ByteBuffer.
virtual size_t read (CharBuffer &buffer) throw (IOException)
 Read data from the stream into a CharBuffer.
template<typename T >
size_t read (Buffer< T > &buffer, size_t &partial) throw (IOException)
 Read data from the stream into a Buffer of arbitrary type.
virtual size_t read (byte_t *buffer, size_t buflen) throw (IOException)
 Read data from the stream into a raw buffer.
size_t read (byte_t *buffer, size_t buflen, int64_t offset, AsyncIOTask &task) throw (IOException)
 Read data asynchronously from the stream into a raw buffer.
size_t read (ByteBuffer &buffer, int64_t offset, AsyncIOTask &task) throw (IOException)
 Read data asynchronously from the stream into a Buffer.
virtual size_t read (MemoryBlock *vec, uint_t count) throw (IOException)
 Read data from the stream into a series of I/O buffers.
size_t write (const byte_t *buffer, size_t buflen, int64_t offset, AsyncIOTask &task) throw (IOException)
 Write data asynchronously to the stream from a raw buffer.
size_t write (ByteBuffer &buffer, int64_t offset, AsyncIOTask &task) throw (IOException)
 Write data asynchronously to the stream from a Buffer.
virtual size_t write (ByteBuffer &buffer) throw (IOException)
 Write data to the stream from a ByteBuffer.
virtual size_t write (CharBuffer &buffer) throw (IOException)
 Write data to the stream from a CharBuffer.
template<typename T >
size_t write (Buffer< T > &buffer, size_t &partial) throw (IOException)
 Write data to the stream from a Buffer of arbitrary type.
virtual size_t write (const byte_t *buffer, size_t buflen) throw (IOException)
 Write data to the stream from a raw buffer, until either the entire buffer is written or an error or timeout occurs.
virtual size_t write (const MemoryBlock *vec, uint_t count) throw (IOException)
 Write data to the stream from a series of I/O buffers.
virtual size_t readFully (ByteBuffer &buffer, size_t count=0) throw (IOException)
 Read data from the stream into a ByteBuffer, until either the buffer is full or an error or timeout occurs.
virtual size_t readFully (CharBuffer &buffer, size_t count=0) throw (IOException)
 Read data from the stream into a CharBuffer, until either the buffer is full or an error or timeout occurs.
template<typename T >
size_t readFully (Buffer< T > &buffer, size_t &partial) throw (IOException)
 Read data from the stream into a Buffer of arbitrary type, until either the buffer is full or an error or timeout occurs.
virtual size_t readFully (byte_t *buffer, size_t buflen) throw (IOException)
 Read data from the stream into a raw buffer, until either the buffer is full or an error or timeout occurs.
virtual size_t writeFully (ByteBuffer &buffer) throw (IOException)
 Write data to the stream from a ByteBuffer, until either the entire buffer is written or an error or timeout occurs.
virtual size_t writeFully (CharBuffer &buffer) throw (IOException)
 Write data to the stream from a CharBuffer, until either the entire buffer is written or an error or timeout occurs.
template<typename T >
size_t writeFully (Buffer< T > &buffer, size_t &partial) throw (IOException)
 Write data to the stream from a Buffer of arbitrary type, until either the entire buffer is written or an error or timeout occurs.
virtual size_t writeFully (const byte_t *buffer, size_t buflen) throw (IOException)
 Write data to the stream from a raw buffer.
virtual int64_t seek (int64_t offset, SeekMode mode=SeekAbsolute) throw (IOException)
 Reposition the seek pointer in the stream.
virtual int64_t tell () throw (IOException)
 Get the current (absolute) offset of the seek pointer.
bool isOpen () const throw ()
 Test if the stream is open.
bool isSeekable () const throw ()
 Test if the stream supports seeking.
bool isReadable () const throw ()
 Test if the stream can be read from.
bool isWritable () const throw ()
 Test if the stream can be written to.
bool isFullDuplex () const throw ()
 Test if the stream is full-duplex (i.e., supports both reading and writing).
bool isHalfDuplex () const throw ()
 Test if the stream is half-duplex (i.e., supports either reading or writing, but not both).
virtual void close (IOMode mode=IOReadWrite) throw ()
 Close the stream for reading, writing, or both.
int getTimeout () const throw ()
 Get the stream I/O timeout, in milliseconds.

Static Public Member Functions

static BaudRate lookupBaudRate (uint_t baudRate) throw ()
 Get the BaudRate enumeration value for the given baud rate value.

Static Public Attributes

static const uint_t MAX_IOBLOCK_COUNT = 16
 The maximum number of I/O buffers that can be passed to the vector I/O methods.

Protected Member Functions

void _init (FileHandle handle, bool seekable, bool readable, bool writable)
 Initialize the stream for use with an open file.

Protected Attributes

String _device
FileHandle _handle
bool _seekable
bool _canRead
bool _canWrite
int _timeout


Detailed Description

A class representing a serial communications port.

Author:
Mark Lindner

Member Enumeration Documentation

enum BaudRate

Baud rates.

Enumerator:
BaudOther 
Baud300 
Baud600 
Baud1200 
Baud1800 
Baud2400 
Baud4800 
Baud9600 
Baud19200 
Baud38400 
Baud57600 
Baud115200 
Baud230400 

enum DataBits

Data bits per byte.

Enumerator:
DataBitsOther 
DataBits5 
DataBits6 
DataBits7 
DataBits8 

Flow control modes.

Enumerator:
FlowOther 
FlowOff 
FlowHardware 
FlowXOnXOff 

enum Parity

Parity types.

Enumerator:
ParityOther 
ParityNone 
ParityOdd 
ParityEven 
ParityMark 
ParitySpace 

enum StopBits

Stop bits.

Enumerator:
StopBitsOther 
StopBits1 
StopBits2 
StopBits15 


Constructor & Destructor Documentation

SerialPort ( const String device  ) 

Construct a new SerialPort for the given device.

Parameters:
device The device: a serial device file like "/dev/ttyS0" on Linux or "/dev/cu.serial0" on Mac OS X, or a label like "\\.\COM1" on Windows.

~SerialPort (  )  throw () [virtual]

Destructor.

Closes the serial port connection.


Member Function Documentation

void _init ( FileHandle  handle,
bool  seekable,
bool  readable,
bool  writable 
) [protected, inherited]

Initialize the stream for use with an open file.

Parameters:
handle The handle to an open file.
seekable A flag indicating whether the stream is seekable.
readable A flag indicating whether the stream is readable.
writable A flag indicating whether the stream is writable.

void close ( IOMode  mode = IOReadWrite  )  throw () [virtual, inherited]

Close the stream for reading, writing, or both.

Parameters:
mode The close mode.

Reimplemented in StreamPipe, and StreamSocket.

void flush (  )  throw (IOException)

Flush any pending I/O on the connection.

Exceptions:
IOException If an I/O error occurs, or if the conneciton is not open.

SerialPort::BaudRate getBaudRate (  )  throw (IOException)

Get the baud rate for the connection.

Returns:
The current baud rate; BaudOther if the baud rate is not one of the predefined enum values.
Exceptions:
IOException If an I/O error occurs, or if the connection is not open.

SerialPort::DataBits getDataBits (  )  throw (IOException)

Get the data bits value for the connection.

Returns:
The current data bits value; DataBitsOther if the value is not one of the predefined enum values.
Exceptions:
IOException If an I/O error occurs, or if the connection is not open.

SerialPort::FlowControl getFlowControl (  )  throw (IOException)

Get the flow control mode for the connection.

Returns:
The current flow control mode; FlowControlOther if the flow control mode is not one of the predefined enum values.
Exceptions:
IOException If an I/O error occurs, or if the connection is not open.

SerialPort::Parity getParity (  )  throw (IOException)

Get the parity type for the connection.

Returns:
The current parity type; ParityOther if the parity type is not one of the predefined enum values.
Exceptions:
IOException If an I/O error occurs, or if the connection is not open.

SerialPort::StopBits getStopBits (  )  throw (IOException)

Get the stop bits value for the connection.

Returns:
The current stop bits value; StopBitsOther if the value is not one of the predefined enum values.
Exceptions:
IOException If an I/O error occurs, or if the connection is not open.

int getTimeout (  )  const throw () [inline, inherited]

Get the stream I/O timeout, in milliseconds.

bool isFullDuplex (  )  const throw () [inline, inherited]

Test if the stream is full-duplex (i.e., supports both reading and writing).

bool isHalfDuplex (  )  const throw () [inline, inherited]

Test if the stream is half-duplex (i.e., supports either reading or writing, but not both).

bool isOpen (  )  const throw () [inline, inherited]

Test if the stream is open.

bool isReadable (  )  const throw () [inline, inherited]

Test if the stream can be read from.

bool isSeekable (  )  const throw () [inline, inherited]

Test if the stream supports seeking.

bool isWritable (  )  const throw () [inline, inherited]

Test if the stream can be written to.

SerialPort::BaudRate lookupBaudRate ( uint_t  baudRate  )  throw () [static]

Get the BaudRate enumeration value for the given baud rate value.

Parameters:
baudRate A baud rate.
Returns:
The BaudRate value that is closest to, but not greater than, the given baud rate.

void open (  )  throw (IOException) [virtual]

Open the serial port connection.

This method must be called before any of the get*() or set*() methods can be used.

Exceptions:
IOException If an I/O error occurs.

size_t read ( MemoryBlock vec,
uint_t  count 
) throw (IOException) [virtual, inherited]

Read data from the stream into a series of I/O buffers.

This operation is known as "vector read" or "scatter read." The buffers are read into in order. On systems that support it, the operation is performed with a single system call.

Parameters:
vec An array of buffers to read into.
count The number of buffers in the array.
Exceptions:
IOException If the end-of-file was reached or some other I/O error occurred.

Reimplemented in StreamSocket.

size_t read ( ByteBuffer buffer,
int64_t  offset,
AsyncIOTask task 
) throw (IOException) [inherited]

Read data asynchronously from the stream into a Buffer.

Parameters:
buffer The Buffer to read into. This object must not be destroyed before the asynchronous I/O operation is completed or cancelled.
offset The file offset to read from.
task The async I/O control block for monitoring the operation.
Returns:
The number of bytes actually read, if the operation completed immediately, otherwise 0 to indicate that the operation has begun.
Exceptions:
IOException If an I/O error occurred.

Reimplemented in StreamSocket.

size_t read ( byte_t buffer,
size_t  buflen,
int64_t  offset,
AsyncIOTask task 
) throw (IOException) [inherited]

Read data asynchronously from the stream into a raw buffer.

Parameters:
buffer The buffer to read into.
buflen The number of bytes to read.
offset The file offset to read from.
task The async I/O control block for monitoring the operation.
Returns:
The number of bytes actually read, if the operation completed immediately, otherwise 0 to indicate that the operation has begun.
Exceptions:
IOException If an I/O error occurred.

Reimplemented in StreamSocket.

size_t read ( byte_t buffer,
size_t  buflen 
) throw (IOException) [virtual, inherited]

Read data from the stream into a raw buffer.

Parameters:
buffer The buffer to read into.
buflen The number of bytes to read.
Returns:
The number of bytes actually read.
Exceptions:
IOException If the end-of-file was reached or some other I/O error occurred.

Reimplemented in StreamSocket.

size_t read ( Buffer< T > &  buffer,
size_t &  partial 
) throw (IOException) [inline, inherited]

Read data from the stream into a Buffer of arbitrary type.

If sizeof(T) is greater than 1 byte, then there can be no guarantee that the number of bytes read before a timeout or error occurs will be evenly divisible by sizeof(T). If the final element was partially read, the number of bytes of the element that were read will be stored in partial; this value should be passed unmodified to the next invocation of this method to continue reading from the appropriate offset within the partially-read element.

Parameters:
buffer The buffer to read into.
partial The number of bytes remaining to read for a partially-read element; on return, the number of bytes read of a partially-read element, or 0 if the last element was read completely. Should be set to 0 prior to the first call to this method for a fresh buffer.
Returns:
The number of whole elements actually read.
Exceptions:
IOException If the end-of-file was reached or some other I/O error occurred.

size_t read ( CharBuffer buffer  )  throw (IOException) [virtual, inherited]

Read data from the stream into a CharBuffer.

Parameters:
buffer The buffer to read into.
Returns:
The number of characters actually read.
Exceptions:
IOException If the end-of-file was reached or some other I/O error occurred.

Reimplemented in StreamSocket.

size_t read ( ByteBuffer buffer  )  throw (IOException) [virtual, inherited]

Read data from the stream into a ByteBuffer.

Parameters:
buffer The buffer to read into.
Returns:
The number of bytes actually read.
Exceptions:
IOException If the end-of-file was reached or some other I/O error occurred.

Reimplemented in StreamSocket.

size_t readFully ( byte_t buffer,
size_t  buflen 
) throw (IOException) [virtual, inherited]

Read data from the stream into a raw buffer, until either the buffer is full or an error or timeout occurs.

Parameters:
buffer The buffer to read into.
buflen The number of bytes to read.
Returns:
The number of bytes actually read.
Exceptions:
IOException If the end-of-file was reached or some other I/O error occurred.

size_t readFully ( Buffer< T > &  buffer,
size_t &  partial 
) throw (IOException) [inline, inherited]

Read data from the stream into a Buffer of arbitrary type, until either the buffer is full or an error or timeout occurs.

If sizeof(T) is greater than 1 byte, then there can be no guarantee that the number of bytes read before a timeout or error occurs will be evenly divisible by sizeof(T). If the final element was partially read, the number of bytes of the element that were read will be stored in partial; this value should be passed unmodified to the next invocation of this method to continue reading from the appropriate offset within the partially-read element.

Parameters:
buffer The buffer to read into.
partial The number of bytes remaining to read for a partially-read element; on return, the number of bytes read of a partially-read element, or 0 if the last element was read completely. Should be set to 0 prior to the first call to this method for a fresh buffer.
Returns:
The number of whole elements actually read.
Exceptions:
IOException If the end-of-file was reached or some other I/O error occurred.

size_t readFully ( CharBuffer buffer,
size_t  count = 0 
) throw (IOException) [virtual, inherited]

Read data from the stream into a CharBuffer, until either the buffer is full or an error or timeout occurs.

Parameters:
buffer The buffer to read into.
count The number of characters to read. If 0 or greater than the number of bytes between the position and the limit, reads up to the limit.
Returns:
The number of bytes actually read.
Exceptions:
IOException If the end-of-file was reached or some other I/O error occurred.

size_t readFully ( ByteBuffer buffer,
size_t  count = 0 
) throw (IOException) [virtual, inherited]

Read data from the stream into a ByteBuffer, until either the buffer is full or an error or timeout occurs.

Parameters:
buffer The buffer to read into.
count The number of bytes to read. If 0 or greater than the number of bytes between the position and the limit, reads up to the limit.
Returns:
The number of bytes actually read.
Exceptions:
IOException If the end-of-file was reached or some other I/O error occurred.

int64_t seek ( int64_t  offset,
SeekMode  mode = SeekAbsolute 
) throw (IOException) [virtual, inherited]

Reposition the seek pointer in the stream.

Parameters:
offset The new offset.
mode The seek mode.
Returns:
The new position of the seek pointer.
Exceptions:
IOException If the stream does not support seeking, or if some other I/O error occurred.

void sendBreak ( uint_t  duration  ) 

Send a break on the serial port for the specified amount of time.

Parameters:
duration The duration. On Windows, the duration is specified in milliseconds. On other platforms, the meaning of the value is implementation-defined.

void setBaudRate ( SerialPort::BaudRate  baud  )  throw (IOException)

Set the baud rate for the connection.

Parameters:
baud The new baud rate.
Exceptions:
IOException If an I/O error occurs, or if the supplied baud rate is BaudOther, or if the connection is not open.

void setDataBits ( SerialPort::DataBits  bits  )  throw (IOException)

Set the number of data bits for the connection.

Parameters:
bits The new data bits value.
Exceptions:
IOException If an I/O error occurs, or if the supplied data bits value is DataBitsOther, or if the connection is not open.

void setFlowControl ( SerialPort::FlowControl  flow  )  throw (IOException)

Set the flow control mode for the connection.

Parameters:
flow The new flow control mode.
Exceptions:
IOException If an I/O error occurs, or if the supplied flow control mode is FlowControlOther, or if the connection is not open.

void setParity ( SerialPort::Parity  parity  )  throw (IOException)

Set the parity type for the connection.

Parameters:
parity The new parity type.
Exceptions:
IOException If an I/O error occurs, or if the supplied parity type is ParityOther, or if the connection is not open.

void setStopBits ( SerialPort::StopBits  bits  )  throw (IOException)

Set the number of stop bits for the connection.

Parameters:
bits The new stop bits value.
Exceptions:
IOException If an I/O error occurs, or if the supplied stop bits value is StopBitsOther, or if the connection is not open.

void setTimeout ( int  msec  )  throw (IOException) [virtual]

Set the stream I/O timeout, in milliseconds.

A timeout of 0 indicates no timeout, and a timeout of -1 indicates infinite timeout (blocking I/O).

Reimplemented from Stream.

int64_t tell (  )  throw (IOException) [virtual, inherited]

Get the current (absolute) offset of the seek pointer.

Returns:
The current offset, from the beginning of the stream.
Exceptions:
IOException If the stream does not support seeking, or if some other I/O error occurred.

size_t write ( const MemoryBlock vec,
uint_t  count 
) throw (IOException) [virtual, inherited]

Write data to the stream from a series of I/O buffers.

This operation is known as "vector write" or "gather write." The buffers are written in order. On systems that support it, the operation is performed with a single system call.

Parameters:
vec An array of buffers to write.
count The number of buffers in the array.
Exceptions:
IOException If an I/O error occurred.

Reimplemented in StreamSocket.

size_t write ( const byte_t buffer,
size_t  buflen 
) throw (IOException) [virtual, inherited]

Write data to the stream from a raw buffer, until either the entire buffer is written or an error or timeout occurs.

Parameters:
buffer A pointer to the buffer.
buflen The number of bytes to write.
Returns:
The number of bytes actually written.
Exceptions:
IOException If an I/O error occurred.

Reimplemented in StreamSocket.

size_t write ( Buffer< T > &  buffer,
size_t &  partial 
) throw (IOException) [inline, inherited]

Write data to the stream from a Buffer of arbitrary type.

If sizeof(T) is greater than 1 byte, then there can be no guarantee that the number of bytes written before a timeout or error occurs will be evenly divisible by sizeof(T). If the final element was partially written, the number of bytes of the element that were written will be stored in partial; this value should be passed unmodified to the next invocation of this method to continue writing from the appropriate offset within the partially-written element.

Parameters:
buffer The buffer to write.
partial The number of bytes remaining to write for a partially-written element; on return, the number of bytes written of a partially-written element, or 0 if the last element was written completely. Should be set to 0 prior to the first call to this method for a fresh buffer.
Returns:
The number of whole elements actually written.
Exceptions:
IOException If an I/O error occurred.

size_t write ( CharBuffer buffer  )  throw (IOException) [virtual, inherited]

Write data to the stream from a CharBuffer.

Parameters:
buffer The buffer to write.
Returns:
The number of characters actually written.
Exceptions:
IOException If an I/O error occurred.

Reimplemented in StreamSocket.

size_t write ( ByteBuffer buffer  )  throw (IOException) [virtual, inherited]

Write data to the stream from a ByteBuffer.

Parameters:
buffer The buffer to write.
Returns:
The number of bytes actually written.
Exceptions:
IOException If an I/O error occurred.

Reimplemented in StreamSocket.

size_t write ( ByteBuffer buffer,
int64_t  offset,
AsyncIOTask task 
) throw (IOException) [inherited]

Write data asynchronously to the stream from a Buffer.

Parameters:
buffer The Buffer to write. This object must not be destroyed before the asynchronous I/O operation is completed or cancelled.
offset The file offset to write to.
task The async I/O control block for monitoring the operation.
Returns:
The number of bytes actually written, if the operation completed immediately, otherwise 0 to indicate that the operation has begun.
Exceptions:
IOException If an I/O error occurred.

Reimplemented in StreamSocket.

size_t write ( const byte_t buffer,
size_t  buflen,
int64_t  offset,
AsyncIOTask task 
) throw (IOException) [inherited]

Write data asynchronously to the stream from a raw buffer.

Parameters:
buffer The buffer to write.
buflen The number of bytes to write.
offset The file offset to write to.
task The async I/O control block for monitoring the operation.
Returns:
The number of bytes actually written, if the operation completed immediately, otherwise 0 to indicate that the operation has begun.
Exceptions:
IOException If an I/O error occurred.

Reimplemented in StreamSocket.

size_t writeFully ( const byte_t buffer,
size_t  buflen 
) throw (IOException) [virtual, inherited]

Write data to the stream from a raw buffer.

Parameters:
buffer A pointer to the buffer.
buflen The number of bytes to write.
Returns:
The number of bytes actually written.
Exceptions:
IOException If an I/O error occurred.

size_t writeFully ( Buffer< T > &  buffer,
size_t &  partial 
) throw (IOException) [inline, inherited]

Write data to the stream from a Buffer of arbitrary type, until either the entire buffer is written or an error or timeout occurs.

If sizeof(T) is greater than 1 byte, then there can be no guarantee that the number of bytes written before a timeout or error occurs will be evenly divisible by sizeof(T). If the final element was partially written, the number of bytes of the element that were written will be stored in partial; this value should be passed unmodified to the next invocation of this method to continue writing from the appropriate offset within the partially-written element.

Parameters:
buffer The buffer to write.
partial The number of bytes remaining to write for a partially-written element; on return, the number of bytes written of a partially-written element, or 0 if the last element was written completely. Should be set to 0 prior to the first call to this method for a fresh buffer.
Returns:
The number of whole elements actually written.
Exceptions:
IOException If an I/O error occurred.

size_t writeFully ( CharBuffer buffer  )  throw (IOException) [virtual, inherited]

Write data to the stream from a CharBuffer, until either the entire buffer is written or an error or timeout occurs.

Parameters:
buffer The buffer to write.
Returns:
The number of bytes actually written.
Exceptions:
IOException If an I/O error occurred.

size_t writeFully ( ByteBuffer buffer  )  throw (IOException) [virtual, inherited]

Write data to the stream from a ByteBuffer, until either the entire buffer is written or an error or timeout occurs.

Parameters:
buffer The buffer to write.
Returns:
The number of bytes actually written.
Exceptions:
IOException If and I/O error occurred.


Member Data Documentation

bool _canRead [protected, inherited]

bool _canWrite [protected, inherited]

String _device [protected]

FileHandle _handle [protected, inherited]

bool _seekable [protected, inherited]

int _timeout [protected, inherited]

const uint_t MAX_IOBLOCK_COUNT = 16 [static, inherited]

The maximum number of I/O buffers that can be passed to the vector I/O methods.


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

Generated on Sat Apr 17 23:03:09 2010 for libcommonc++ by  doxygen 1.5.9