diff options
Diffstat (limited to 'libjava/classpath/test/java.io/OOSExtern.java')
-rw-r--r-- | libjava/classpath/test/java.io/OOSExtern.java | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/libjava/classpath/test/java.io/OOSExtern.java b/libjava/classpath/test/java.io/OOSExtern.java new file mode 100644 index 0000000..7394c5b --- /dev/null +++ b/libjava/classpath/test/java.io/OOSExtern.java @@ -0,0 +1,37 @@ + +import java.io.*; + +public class OOSExtern extends OOSNoCallDefault implements Externalizable +{ + public OOSExtern() + {} + + OOSExtern( int X, String S, boolean B ) + { + super( X, S, B ); + } + + public void writeExternal( ObjectOutput oo ) throws IOException + { + oo.writeInt( super.x ); + oo.writeObject( super.s ); + oo.writeBoolean( super.b ); + } + + public void readExternal( ObjectInput oi ) + throws ClassNotFoundException, IOException + { + super.x = oi.readInt(); + super.s = (String)oi.readObject(); + super.b = oi.readBoolean(); + } + + public boolean equals( Object o ) + { + OOSExtern e = (OOSExtern)o; + return e.x == super.x + && e.s.equals( super.s ) + && e.b == super.b; + } + +} |