Implementing an XDR DataInputStream / DataOutputStream

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Alexandros Karypidis

    Implementing an XDR DataInputStream / DataOutputStream

    Hi all,

    I would like some advice regarding the following design issue:

    I would like to be able to exchange data in XDR format. I was thinking of
    writing a pair of I/O streams in the same fashion as DataInputStream and
    DataOutputStrea m. I am ambivalent as to whether I should:

    (a) subclass DataInputStream / DataOutputStrea m and override what is needed
    (b) subclass FilterInputStre am / FilterOutputStr eam and implement the
    DataInput / DataOutput interfaces.

    The option (b) is how DataInputStream / DataOutputStrea m are implemented. On
    the other hand, option (a) would allow my streams to be used as a drop-in
    replacement for code written with DataInputStream / DataOutputStrea m.

    --
    In theory, there is no difference between theory and practice.
    In practice, there is. -- Yogi Berra.

    Alexandros Karypidis
    University of Thessaly
    Computer & Communications Engineering dept.
Working...