2005/5/9

     
 

class AbstractObjectReader

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

acdk::io::AbstractObjectReader Class Reference

#include <AbstractObjectReader.h>

Inheritance diagram for acdk::io::AbstractObjectReader:

acdk::io::AbstractFilterReader acdk::io::ObjectReader acdk::io::AbstractReader acdk::io::FilterReader acdk::lang::Object acdk::io::Reader acdk::lang::ObjectBase acdk::lang::dmi::StdDispatch acdk::io::BinaryObjectReader acdk::xml::XMLObjectReader acdk::java::serialization::JavaObjectReader List of all members.

Detailed Description

Abstract basic implementation for a ObjectReader.

API: ACDK<br/>

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


Public Member Functions

 AbstractObjectReader (IN(RReader) in, int flags=SerializeDefaultFlags)
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 void setIn (IN(RReader) reader)
virtual RStorage getStorage ()
 Gets the storage reader.

virtual RReader getStorageReader ()
virtual acdk::lang::Object readObject ()
 in this Version the stream itself has to store meta information about the class of the object.

acdk::lang::Object readObject2 ()
virtual acdk::lang::Object readObject (IN(::acdk::lang::RClass) cls)
 In this version, the stream may not store meta information about the classes.

acdk::lang::Object readObject2 (IN(::acdk::lang::RClass) cls)
bool isNamed ()
bool isLabeled ()
bool isTagged ()
bool isReduced ()
bool joinStrings ()
bool withSerialVersionUID ()
virtual RString readTagStart (IN(RString) key, IN(RString) expected=Nil)=0
 Reads start of Tag.

virtual RString readTagEnd (IN(RString) key, IN(RString) expected=Nil)=0
 Writes end of Tag.

virtual RClass readClassId ()=0
 reads from the stream the acdk::lang::Object Id (for example the fully qualified class name) and create an new acdk::lang::Object if withSerialVersionUID() is true, the should be read and checked agains local class

virtual int readObjectLocalId ()
 To enable cyclic containment Objects.

virtual void defaultReadObject (IN(RClass) cls, IN(acdk::lang::Object) obj)
 default method for reading objects data only fields of current class are read.

virtual RClass readClassDescriptor (IN(RClass) cls)
void readObjectHierarchy (IN(RClass) cls, IN(acdk::lang::Object) obj)
virtual bool readBoolean ()=0
 From acdk::io::DataReader.

virtual char readChar ()=0
virtual double readDouble ()=0
virtual float readFloat ()=0
virtual int readInt ()=0
virtual jlong readLong ()=0
virtual short readShort ()=0
virtual RString readString ()
virtual RString readStringImpl ()=0
virtual RbyteArray readOpaque ()
 writes the oktet array as opaque data with optional encoding

virtual acdk::lang::dmi::ScriptVar readScriptVar (bool withTypeInfo=true, bool withFlags=true)
RString readStringElement ()
bool readBooleanElement ()
char readCharElement ()
uc2char readUcCharElement ()
byte readByteElement ()
short readShortElement ()
int readIntElement ()
jlong readLongElement ()
float readFloatElement ()
double readDoubleElement ()

Protected Member Functions

void resetLRefs ()
acdk::lang::Object _readBasicArray (IN(RClass) cls, int length)
acdk::lang::Object _readObject (IN(::acdk::lang::RClass) cls)
::acdk::lang::dmi::ScriptVar _readScriptVar (int type, int flags)

Private Attributes

int _serializeFlags
::acdk::util::RTreeMap _lref
RObjectArray _lrefs
RStringArray _stringCache
 Integer -> RString;.


Constructor & Destructor Documentation

acdk::io::AbstractObjectReader::AbstractObjectReader IN(RReader in,
int  flags = SerializeDefaultFlags
[inline]
 


Member Function Documentation

acdk::lang::Object acdk::io::AbstractObjectReader::_readBasicArray IN(RClass cls,
int  length
[protected]
 

acdk::lang::Object acdk::io::AbstractObjectReader::_readObject IN(::acdk::lang::RClass cls  )  [protected]
 

::acdk::lang::dmi::ScriptVar acdk::io::AbstractObjectReader::_readScriptVar int  type,
int  flags
[protected]
 

virtual void acdk::io::AbstractObjectReader::defaultReadObject IN(RClass cls,
IN(acdk::lang::Object obj
[virtual]
 

default method for reading objects data only fields of current class are read.

Implements acdk::io::ObjectReader.

virtual RStorage acdk::io::AbstractObjectReader::getStorage  )  [inline, virtual]
 

Gets the storage reader.

If this contains an FilterReader instead of a Storage, the storage reader of this filter reader will be returned (recursive).

Reimplemented from acdk::io::AbstractFilterReader.

virtual RReader acdk::io::AbstractObjectReader::getStorageReader  )  [inline, virtual]
 

Reimplemented from acdk::io::AbstractFilterReader.

bool acdk::io::AbstractObjectReader::isLabeled  )  [inline]
 

bool acdk::io::AbstractObjectReader::isNamed  )  [inline]
 

bool acdk::io::AbstractObjectReader::isReduced  )  [inline]
 

bool acdk::io::AbstractObjectReader::isTagged  )  [inline]
 

bool acdk::io::AbstractObjectReader::joinStrings  )  [inline]
 

virtual bool acdk::io::AbstractObjectReader::readBoolean  )  [pure virtual]
 

From acdk::io::DataReader.

Implements acdk::io::ObjectReader.

Implemented in acdk::io::BinaryObjectReader, and acdk::xml::XMLObjectReader.

bool acdk::io::AbstractObjectReader::readBooleanElement  )  [inline]
 

byte acdk::io::AbstractObjectReader::readByteElement  )  [inline]
 

virtual char acdk::io::AbstractObjectReader::readChar  )  [pure virtual]
 

Implements acdk::io::ObjectReader.

Implemented in acdk::io::BinaryObjectReader, and acdk::xml::XMLObjectReader.

char acdk::io::AbstractObjectReader::readCharElement  )  [inline]
 

virtual RClass acdk::io::AbstractObjectReader::readClassDescriptor IN(RClass cls  )  [virtual]
 

Parameters:
cls may be Nul
Returns:
if the readClassDescriptor just return param cls

Implements acdk::io::ObjectReader.

virtual RClass acdk::io::AbstractObjectReader::readClassId  )  [pure virtual]
 

reads from the stream the acdk::lang::Object Id (for example the fully qualified class name) and create an new acdk::lang::Object if withSerialVersionUID() is true, the should be read and checked agains local class

Implemented in acdk::io::BinaryObjectReader, and acdk::xml::XMLObjectReader.

virtual double acdk::io::AbstractObjectReader::readDouble  )  [pure virtual]
 

Implements acdk::io::ObjectReader.

Implemented in acdk::io::BinaryObjectReader, and acdk::xml::XMLObjectReader.

double acdk::io::AbstractObjectReader::readDoubleElement  )  [inline]
 

virtual float acdk::io::AbstractObjectReader::readFloat  )  [pure virtual]
 

Implements acdk::io::ObjectReader.

Implemented in acdk::io::BinaryObjectReader, and acdk::xml::XMLObjectReader.

float acdk::io::AbstractObjectReader::readFloatElement  )  [inline]
 

virtual int acdk::io::AbstractObjectReader::readInt  )  [pure virtual]
 

Implements acdk::io::ObjectReader.

Implemented in acdk::io::BinaryObjectReader, and acdk::xml::XMLObjectReader.

int acdk::io::AbstractObjectReader::readIntElement  )  [inline]
 

virtual jlong acdk::io::AbstractObjectReader::readLong  )  [pure virtual]
 

Implements acdk::io::ObjectReader.

Implemented in acdk::io::BinaryObjectReader, and acdk::xml::XMLObjectReader.

jlong acdk::io::AbstractObjectReader::readLongElement  )  [inline]
 

virtual acdk::lang::Object acdk::io::AbstractObjectReader::readObject IN(::acdk::lang::RClass cls  )  [virtual]
 

In this version, the stream may not store meta information about the classes.

Implements acdk::io::ObjectReader.

virtual acdk::lang::Object acdk::io::AbstractObjectReader::readObject  )  [virtual]
 

in this Version the stream itself has to store meta information about the class of the object.

Implements acdk::io::ObjectReader.

Reimplemented in acdk::java::serialization::JavaObjectReader.

acdk::lang::Object acdk::io::AbstractObjectReader::readObject2 IN(::acdk::lang::RClass cls  ) 
 

acdk::lang::Object acdk::io::AbstractObjectReader::readObject2  ) 
 

void acdk::io::AbstractObjectReader::readObjectHierarchy IN(RClass cls,
IN(acdk::lang::Object obj
 

virtual int acdk::io::AbstractObjectReader::readObjectLocalId  )  [inline, virtual]
 

To enable cyclic containment Objects.

virtual RbyteArray acdk::io::AbstractObjectReader::readOpaque  )  [inline, virtual]
 

writes the oktet array as opaque data with optional encoding

Reimplemented from acdk::io::DataReader.

Reimplemented in acdk::xml::XMLObjectReader.

virtual acdk::lang::dmi::ScriptVar acdk::io::AbstractObjectReader::readScriptVar bool  withTypeInfo = true,
bool  withFlags = true
[virtual]
 

Parameters:
withTypeInfo the the is encoded in the stream
withFlags writes also the flags

Reimplemented from acdk::io::ObjectReader.

virtual short acdk::io::AbstractObjectReader::readShort  )  [pure virtual]
 

Implements acdk::io::ObjectReader.

Implemented in acdk::io::BinaryObjectReader, and acdk::xml::XMLObjectReader.

short acdk::io::AbstractObjectReader::readShortElement  )  [inline]
 

virtual RString acdk::io::AbstractObjectReader::readString  )  [virtual]
 

Implements acdk::io::ObjectReader.

Reimplemented in acdk::java::serialization::JavaObjectReader.

RString acdk::io::AbstractObjectReader::readStringElement  )  [inline]
 

virtual RString acdk::io::AbstractObjectReader::readStringImpl  )  [pure virtual]
 

Implemented in acdk::io::BinaryObjectReader, and acdk::xml::XMLObjectReader.

virtual RString acdk::io::AbstractObjectReader::readTagEnd IN(RString key,
IN(RString expected = Nil
[pure virtual]
 

Writes end of Tag.

For example '' for a int type. This function will be called by writeObject if the object should be written with tags

Implemented in acdk::io::BinaryObjectReader, and acdk::xml::XMLObjectReader.

virtual RString acdk::io::AbstractObjectReader::readTagStart IN(RString key,
IN(RString expected = Nil
[pure virtual]
 

Reads start of Tag.

For example '' for a int type in a XML style Reader. This function will be called by writeObject if the object should be written with tags if the expected tag does not exists, throw ObjectStreamException

Implemented in acdk::io::BinaryObjectReader, and acdk::xml::XMLObjectReader.

uc2char acdk::io::AbstractObjectReader::readUcCharElement  )  [inline]
 

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

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

Reimplemented from acdk::io::AbstractFilterReader.

void acdk::io::AbstractObjectReader::resetLRefs  )  [inline, protected]
 

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

Set stream position in this Reader to given position.

Returns:
the absolute position in this stream

Reimplemented from acdk::io::AbstractFilterReader.

virtual void acdk::io::AbstractObjectReader::setIn IN(RReader reader  )  [inline, virtual]
 

Reimplemented from acdk::io::AbstractFilterReader.

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

Move forwart into the stream.

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

Reimplemented from acdk::io::AbstractFilterReader.

bool acdk::io::AbstractObjectReader::withSerialVersionUID  )  [inline]
 


Member Data Documentation

::acdk::util::RTreeMap acdk::io::AbstractObjectReader::_lref [private]
 

RObjectArray acdk::io::AbstractObjectReader::_lrefs [private]
 

int acdk::io::AbstractObjectReader::_serializeFlags [private]
 

RStringArray acdk::io::AbstractObjectReader::_stringCache [private]
 

Integer -> RString;.