aboutsummaryrefslogtreecommitdiff
path: root/libjava/classpath/test/java.io/OOSExtern.java
blob: 7394c5bc85a7abf460d6823caf86feebd9124387 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
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;
  }
  
}