2005/5/9

     
 

class MemWriter

artefaktur
Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   Namespace Members   Compound Members   Related Pages  

acdk::io::MemWriter Class Reference

#include <MemWriter.h>

Inheritance diagram for acdk::io::MemWriter:

acdk::io::AbstractStorageWriter acdk::io::AbstractWriter acdk::io::Storage acdk::lang::Object acdk::io::Writer acdk::lang::ObjectBase acdk::lang::dmi::StdDispatch acdk::net::srfsys::SRSFileWriter List of all members.

Detailed Description

Provides a Writer interface to byteArray.

API: ACDK<br/>

Deprecated:
use ByteBufferWriter
Author:
Roger Rene Kommer (mailto:kommer@artefaktur.com)
Version:
Revision
1.20
Date:
Date
2005/04/09 19:26:45


Public Member Functions

 MemWriter (int initsize=MemWriter::DefaultBufferSize)
 MemWriter (IN(RbyteArray) buffer)
 ~MemWriter ()
virtual void write (byte c)
 default implementation: byte cbuf[2]; cbuf[1] = 0; cbuf[0] = c; return write((const byte*)cbuf, 0, 1);

virtual void write (const byte *cstr, int offset, int len)
virtual void write (IN(RbyteArray) ch, int offset=0, int len=-1)
 default implementation: return write(ch->data(), offset, len == -1 ? ch->length() - offset : len);

virtual void flush ()
virtual void close ()
virtual RbyteArray getBuffer ()
RcharArray getBufferAsChars ()
void ensureCapacity (int size)
virtual RString getDeviceName ()
virtual bool isWriteable ()
virtual bool isReadable ()

Static Public Attributes

int DefaultBufferSize
int IncrementBufferSize

Protected Attributes

RbyteArray _buffer


Constructor & Destructor Documentation

acdk::io::MemWriter::MemWriter int  initsize = MemWriter::DefaultBufferSize  )  [inline]
 

acdk::io::MemWriter::MemWriter IN(RbyteArray buffer  )  [inline]
 

acdk::io::MemWriter::~MemWriter  )  [inline]
 


Member Function Documentation

virtual void acdk::io::MemWriter::close  )  [inline, virtual]
 

Implements acdk::io::AbstractWriter.

Reimplemented in acdk::net::srfsys::SRSFileWriter.

void acdk::io::MemWriter::ensureCapacity int  size  )  [inline]
 

virtual void acdk::io::MemWriter::flush  )  [inline, virtual]
 

Implements acdk::io::AbstractWriter.

virtual RbyteArray acdk::io::MemWriter::getBuffer  )  [inline, virtual]
 

RcharArray acdk::io::MemWriter::getBufferAsChars  ) 
 

virtual RString acdk::io::MemWriter::getDeviceName  )  [inline, virtual]
 

Returns:
the name of the device. Normally the filename

Implements acdk::io::AbstractStorageWriter.

virtual bool acdk::io::MemWriter::isReadable  )  [inline, virtual]
 

Returns:
true if Storage is readable

Implements acdk::io::AbstractStorageWriter.

virtual bool acdk::io::MemWriter::isWriteable  )  [inline, virtual]
 

Returns:
true if Storage is writable

Implements acdk::io::AbstractStorageWriter.

virtual void acdk::io::MemWriter::write IN(RbyteArray ch,
int  offset = 0,
int  len = -1
[inline, virtual]
 

default implementation: return write(ch->data(), offset, len == -1 ? ch->length() - offset : len);

Reimplemented from acdk::io::AbstractWriter.

virtual void acdk::io::MemWriter::write const byte cstr,
int  offset,
int  len
[virtual]
 

Reimplemented from acdk::io::AbstractWriter.

virtual void acdk::io::MemWriter::write byte  c  )  [inline, virtual]
 

default implementation: byte cbuf[2]; cbuf[1] = 0; cbuf[0] = c; return write((const byte*)cbuf, 0, 1);

Implements acdk::io::AbstractWriter.


Member Data Documentation

RbyteArray acdk::io::MemWriter::_buffer [protected]
 

int acdk::io::MemWriter::DefaultBufferSize [static]
 

int acdk::io::MemWriter::IncrementBufferSize [static]