Implementing an XDR DataInputStream / DataOutputStream
From: Alexandros Karypidis (karypid_at_inf.uth.nospam.gr)
Date: 03/24/04
- Next message: ark: "finalize() newbie question"
- Previous message: salavi: "Re: How do I calculate the free disk space from within a java program?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 24 Mar 2004 18:27:59 +0200
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
DataOutputStream. I am ambivalent as to whether I should:
(a) subclass DataInputStream / DataOutputStream and override what is needed
(b) subclass FilterInputStream / FilterOutputStream and implement the
DataInput / DataOutput interfaces.
The option (b) is how DataInputStream / DataOutputStream 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 / DataOutputStream.
-- 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.
- Next message: ark: "finalize() newbie question"
- Previous message: salavi: "Re: How do I calculate the free disk space from within a java program?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|