KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jgroups > util > Streamable


1 package org.jgroups.util;
2
3 import java.io.DataInputStream JavaDoc;
4 import java.io.DataOutputStream JavaDoc;
5 import java.io.IOException JavaDoc;
6
7 /**
8  * Implementations of Streamable can add their state directly to the output stream, enabling them to bypass costly
9  * serialization
10  * @author Bela Ban
11  * @version $Id: Streamable.java,v 1.1 2004/10/04 20:40:58 belaban Exp $
12  */

13 public interface Streamable {
14
15     /** Write the entire state of the current object (including superclasses) to outstream */
16     void writeTo(DataOutputStream JavaDoc out) throws IOException JavaDoc;
17
18     /** Read the state of the current object (including superclasses) from instream */
19     void readFrom(DataInputStream JavaDoc in) throws IOException JavaDoc, IllegalAccessException JavaDoc, InstantiationException JavaDoc;
20 }
21
Popular Tags