Initial revision
From-SVN: r102074
This commit is contained in:
parent
6f4434b39b
commit
f911ba985a
4557 changed files with 1000262 additions and 0 deletions
39
libjava/classpath/test/java.io/OOSCallDefault.java
Normal file
39
libjava/classpath/test/java.io/OOSCallDefault.java
Normal file
|
@ -0,0 +1,39 @@
|
|||
|
||||
import java.io.*;
|
||||
|
||||
public class OOSCallDefault implements Serializable
|
||||
{
|
||||
int x;
|
||||
double y;
|
||||
transient String s;
|
||||
|
||||
OOSCallDefault( int X, double Y, String S )
|
||||
{
|
||||
x = X;
|
||||
y = Y;
|
||||
s = S;
|
||||
}
|
||||
|
||||
public boolean equals( Object o )
|
||||
{
|
||||
OOSCallDefault oo = (OOSCallDefault)o;
|
||||
return oo.x == x
|
||||
&& oo.y == y
|
||||
&& oo.s.equals( s );
|
||||
}
|
||||
|
||||
private void writeObject( ObjectOutputStream oos ) throws IOException
|
||||
{
|
||||
oos.writeObject( s );
|
||||
oos.defaultWriteObject();
|
||||
oos.writeObject( s );
|
||||
}
|
||||
|
||||
private void readObject( ObjectInputStream ois )
|
||||
throws ClassNotFoundException, IOException
|
||||
{
|
||||
ois.readObject();
|
||||
ois.defaultReadObject();
|
||||
s = (String)ois.readObject();
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue