2005/5/9

     
 

class AbstractReader

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

acdk::io::AbstractReader Class Reference

#include <AbstractReader.h>

Inheritance diagram for acdk::io::AbstractReader:

acdk::lang::Object acdk::io::Reader acdk::lang::ObjectBase acdk::lang::dmi::StdDispatch acdk::io::AbstractFilterReader acdk::io::AbstractStorageReader acdk::io::ByteBufferReader acdk::io::BytePtrReader acdk::io::CharToByteReader acdk::io::JoinedReader acdk::io::AbstractObjectReader acdk::io::ASCIIDataReader acdk::io::BinaryDataReader acdk::io::BufferedReader acdk::io::LineNumberReader acdk::io::PushbackReader acdk::io::SubReader acdk::io::TeeReader acdk::net::TransRateReader acdk::vfile::InflaterReader acdkx::orb::CDRObjectReader acdk::io::ConsoleReader acdk::io::FileReader acdk::io::MemReader acdk::io::PipedReader acdk::io::ByteBufferPtrReader List of all members.

Detailed Description

Basic incomplete implementation for a Reader.

This class already implements the IO locking mechanism. API: ACDK

Author:
Roger Rene Kommer (mailto:kommer@artefaktur.com)
Version:
Revision
1.17
Date:
Date
2005/04/09 19:26:44


Public Member Functions

 AbstractReader ()
 AbstractReader (IN(acdk::lang::Object) obj)
virtual ~AbstractReader ()
virtual void lock ()
 lock the object instance.

virtual void unlock ()
 unlock the object instance Note: Will be overwritten by acdk::io::Reader and acdk::io::Writer Note: if Unsynchronized or isStack is set, this call will have no effect

void setLock (IN(acdk::lang::Object) obj)
 API: enhanced Set the acdk::lang::Object, which will be used for synchronization.

acdk::lang::Object getLock ()
 API: enhanced.

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 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)
overwrite void reset ()=0
 if mark is set, set stream to mark point otherwise to begin of this stream.


Protected Attributes

acdk::lang::Object iolock
 API: JDK modified In the JDK this member variable is named lock.


Constructor & Destructor Documentation

acdk::io::AbstractReader::AbstractReader  )  [inline]
 

acdk::io::AbstractReader::AbstractReader IN(acdk::lang::Object obj  )  [inline]
 

virtual acdk::io::AbstractReader::~AbstractReader  )  [inline, virtual]
 


Member Function Documentation

acdk::lang::Object acdk::io::AbstractReader::getLock  )  [inline]
 

API: enhanced.

Returns:
the acdk::lang::Object, which will be used for synchronization

virtual void acdk::io::AbstractReader::lock  )  [inline, virtual]
 

lock the object instance.

Note: Will be overwritten by acdk::io::Reader and acdk::io::Writer Note: if Unsynchronized or isStack is set, this call will have no effect

Reimplemented from acdk::lang::ObjectBase.

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

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

Reimplemented from acdk::io::Reader.

Reimplemented in acdk::io::AbstractFilterReader, acdk::io::BinaryObjectReader, acdk::io::BufferedReader, acdk::io::ByteBufferReader, acdk::io::BytePtrReader, acdk::io::CharToByteReader, acdk::io::ConsoleReader, acdk::io::FileReader, acdk::io::JoinedReader, acdk::io::LineNumberReader, acdk::io::MemReader, acdk::io::PipedReader, acdk::io::PushbackReader, acdk::io::SubReader, acdk::io::TeeReader, acdk::lang::Process_PipeReader, acdk::net::TransRateReader, acdk::vfile::InflaterReader, and acdkx::orb::CDRObjectReader.

virtual int acdk::io::AbstractReader::read IN(RbyteArray buffer,
int  offset = 0,
int  len = -1
[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.

Reimplemented in acdk::io::AbstractFilterReader, acdk::io::BinaryObjectReader, acdk::io::BufferedReader, acdk::io::ByteBufferReader, acdk::io::BytePtrReader, acdk::io::CharToByteReader, acdk::io::ConsoleReader, acdk::io::FileReader, acdk::io::JoinedReader, acdk::io::LineNumberReader, acdk::io::MemReader, acdk::io::PipedReader, acdk::io::PushbackReader, acdk::io::SubReader, acdk::io::TeeReader, acdk::lang::Process_PipeReader, acdk::net::TransRateReader, acdk::vfile::InflaterReader, and acdkx::orb::CDRObjectReader.

virtual int acdk::io::AbstractReader::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.

Reimplemented in acdk::io::AbstractFilterReader, acdk::io::BinaryObjectReader, acdk::io::BufferedReader, acdk::io::ByteBufferReader, acdk::io::BytePtrReader, acdk::io::CharToByteReader, acdk::io::ConsoleReader, acdk::io::FileReader, acdk::io::JoinedReader, acdk::io::LineNumberReader, acdk::io::MemReader, acdk::io::PipedReader, acdk::io::PushbackReader, acdk::io::SubReader, acdk::io::TeeReader, acdk::lang::Process_PipeReader, acdk::net::TransRateReader, acdk::vfile::InflaterReader, and acdkx::orb::CDRObjectReader.

overwrite void acdk::io::AbstractReader::reset  )  [pure virtual]
 

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

Implements acdk::io::Reader.

Implemented in acdk::io::AbstractFilterReader, acdk::io::AbstractObjectReader, acdk::io::ASCIIDataReader, acdk::io::BinaryDataReader, acdk::io::BufferedReader, acdk::io::ByteBufferReader, acdk::io::BytePtrReader, acdk::io::CharToByteReader, acdk::io::ConsoleReader, acdk::io::FileReader, acdk::io::JoinedReader, acdk::io::LineNumberReader, acdk::io::MemReader, acdk::io::PipedReader, acdk::vfile::InflaterReader, and acdkx::orb::CDRObjectReader.

virtual jlong acdk::io::AbstractReader::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.

Reimplemented in acdk::io::AbstractFilterReader, acdk::io::AbstractObjectReader, acdk::io::ASCIIDataReader, acdk::io::BinaryDataReader, acdk::io::BufferedReader, acdk::io::ByteBufferReader, acdk::io::BytePtrReader, acdk::io::CharToByteReader, acdk::io::ConsoleReader, acdk::io::FileReader, acdk::io::JoinedReader, acdk::io::MemReader, acdk::vfile::InflaterReader, and acdkx::orb::CDRObjectReader.

void acdk::io::AbstractReader::setLock IN(acdk::lang::Object obj  )  [inline]
 

API: enhanced Set the acdk::lang::Object, which will be used for synchronization.

virtual jlong acdk::io::AbstractReader::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.

Reimplemented in acdk::io::AbstractFilterReader, acdk::io::AbstractObjectReader, acdk::io::ASCIIDataReader, acdk::io::BinaryDataReader, acdk::io::BufferedReader, acdk::io::ByteBufferReader, acdk::io::BytePtrReader, acdk::io::CharToByteReader, acdk::io::FileReader, acdk::io::JoinedReader, acdk::io::MemReader, acdk::io::PushbackReader, acdk::io::SubReader, acdk::vfile::InflaterReader, and acdkx::orb::CDRObjectReader.

virtual void acdk::io::AbstractReader::unlock  )  [inline, virtual]
 

unlock the object instance Note: Will be overwritten by acdk::io::Reader and acdk::io::Writer Note: if Unsynchronized or isStack is set, this call will have no effect

Reimplemented from acdk::lang::ObjectBase.


Member Data Documentation

acdk::lang::Object acdk::io::AbstractReader::iolock [protected]
 

API: JDK modified In the JDK this member variable is named lock.

But this is confusing with the method lock.