|
|
Class: ObjectCoder
Object
|
+--Visitor
|
+--AspectVisitor
|
+--ObjectCoder
|
+--BaseNCoder
|
+--JSONPrinter
|
+--XMLCoder
- Package:
- stx:libbasic
- Category:
- System-Storage
- Version:
- rev:
1.15
date: 2005/11/16 08:47:25
- user: stefan
- file: ObjectCoder.st directory: libbasic
- module: stx stc-classLibrary: libbasic
- Author:
- Stefan Vogel
This is an abstract class. Subclasses implement encoding and decoding
of Objects onto resp. from a stream. Possible coders are ASN.1/BER,
CORBA/CDR, BOSS, RMI ...
Classes which implement basic types (Boolean, Integer, Float, ...)
implement the visitor methods #acceptVisitor:with:, which dispatches onto an ObjectCoder.
[instance variables:]
stream <Stream> the stream we read/write the encodings from/to
[class variables:]
OSI::ASN1_Coder
encoding
-
decode: anObject
-
decode anObject
-
decodingOf: anObject
-
use encode
** This is an obsolete interface - do not use it (it may vanish in future versions) **
-
encode: anObject
-
encode of anObject
-
encode: anObject on: aStream
-
-
encode: anObject on: aStream with: info
-
-
encode: anObject with: aParameter
-
return the encoding of anObject
-
encodingOf: anObject
-
use #encode:
** This is an obsolete interface - do not use it (it may vanish in future versions) **
-
encodingOf: anObject with: aParameter
-
use #encode:with:
** This is an obsolete interface - do not use it (it may vanish in future versions) **
instance creation
-
on: aStream
-
return an encoder/decoder for a stream
accessing
-
contents
-
decoding
-
next
-
read, decode and return the next object
** This method raises an error - it must be redefined in concrete classes **
encoding
-
encodingOf: anObject
-
answer the encoded argument anObject
-
encodingOf: anObject with: aParameter
-
answer the encoded argument anObject
-
nextPut: anObject
-
encode anObject onto my stream
-
nextPut: anObject with: aParameter
-
encode anObject onto my stream
-
nextPutAll: aCollectionOfObjects
-
encode all objects from the argument
encoding-smalltalk types
-
visitBlock: aBlock with: aParameter
-
encoding of blocks is rather difficult and an error by default.
If your encoder supports this, redefine it there
initialization
-
close
-
close the underlying stream
-
emptyWriteStream
-
answer an empty stream for writing the encoded object
** This method raises an error - it must be redefined in concrete classes **
-
flush
-
flush possibly internally buffered data.
Nothing is done by default. Subclasses may redefine this
-
reset
-
reset the coder
private-accessing
-
stream: aStream
-
|