artefaktur
software engineer &        architecture

 
 
 
 

class LittleBytesReader

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

acdk::io::LittleBytesReader Class Reference

#include <ByteToCharWriter.h>

Inheritance diagram for acdk::io::LittleBytesReader:

acdk::lang::Object acdk::io::Reader acdk::lang::ObjectBase acdk::lang::dmi::StdDispatch List of all members.

Detailed Description

helper for ByteToCharWriter.

Author:
Roger Rene Kommer (mailto:kommer@artefaktur.com)
Version:
Revision
1.6
Date:
Date
2005/02/05 10:44:53


Public Member Functions

 LittleBytesReader ()
virtual jlong seek (SeekPos seekrel, jlong seekpos)
 Set stream position in this Reader to given position.

virtual jlong skip (jlong n)
 Move forwart into the stream.

virtual void reset ()
 if mark is set, set stream to mark point otherwise to begin of this stream.

virtual int read ()
 read a single byte from stream

virtual int read (IN(RbyteArray) buffer, int offset=0, int len=-1)
 read the len bytes into buffer at offset of the buffer

virtual int read (byte *buffer, int offset, int len)
void addByte (byte b)
virtual int available ()
 returns the number of bytes available in this stream before blocking Some Reader always return 0

int _getAvailable ()

Public Attributes

byte _buffer [32]
int _index
int _endBuffer

Constructor & Destructor Documentation

acdk::io::LittleBytesReader::LittleBytesReader  )  [inline]
 


Member Function Documentation

int acdk::io::LittleBytesReader::_getAvailable  )  [inline]
 

void acdk::io::LittleBytesReader::addByte byte  b  )  [inline]
 

virtual int acdk::io::LittleBytesReader::available  )  [inline, virtual]
 

returns the number of bytes available in this stream before blocking Some Reader always return 0

Reimplemented from acdk::io::Reader.

virtual int acdk::io::LittleBytesReader::read byte buffer,
int  offset,
int  len
[inline, virtual]
 

See also:
other read(RbyteArray, int, int)

Reimplemented from acdk::io::Reader.

virtual int acdk::io::LittleBytesReader::read IN(RbyteArray buffer,
int  offset = 0,
int  len = -1
[inline, virtual]
 

read the len bytes into buffer at offset of the buffer

Parameters:
buffer where to write the bytes
offset offset to write into buffer
len how many bytes to read. if == -1 read into many bytes, that fits into buffer (buffer->length() - offset) ``
Returns:
number of bytes readed. may less than input if EOS is reached
Exceptions:
EOF exception, if trying to read behind EOS

Reimplemented from acdk::io::Reader.

virtual int acdk::io::LittleBytesReader::read  )  [inline, virtual]
 

read a single byte from stream

Returns:
the byte readed or -1 if EOS.
Exceptions:
EOF exception, if trying to read behind EOS

Reimplemented from acdk::io::Reader.

virtual void acdk::io::LittleBytesReader::reset  )  [inline, virtual]
 

if mark is set, set stream to mark point otherwise to begin of this stream.

Implements acdk::io::Reader.

virtual jlong acdk::io::LittleBytesReader::seek SeekPos  seekrel,
jlong  seekpos
[inline, virtual]
 

Set stream position in this Reader to given position.

Returns:
the absolute position in this stream

Implements acdk::io::Reader.

virtual jlong acdk::io::LittleBytesReader::skip jlong  n  )  [inline, virtual]
 

Move forwart into the stream.

Returns:
how many bytes skipped. May less then input, in case EOS is reached

Implements acdk::io::Reader.


Member Data Documentation

byte acdk::io::LittleBytesReader::_buffer[32]
 

int acdk::io::LittleBytesReader::_endBuffer
 

int acdk::io::LittleBytesReader::_index
 

 
Last modified 2005-05-08 18:32 by SYSTEM By Artefaktur, Ing. Bureau Kommer