class File implements java.io.Serializable {
int a;
private String[] pathcomponents;
private static final ObjectStreamField[] serialPersistentFields
= new ObjectStreamField("path", String.class);
private void writeObject(ObjectOutputStream s)
throws IOException
{
ObjectOutputStream.PutField fields = s.putFields();
StringBuffer str = new StringBuffer();
for(int i = 0; i < pathcomponents; i++) {
str.append(separator);
str.append(pathcomponents[i]);
}
fields.put("path", str.toString());
s.writeFields();
s.writeChar(separatorChar); }
private void readObject(ObjectInputStream s)
throws IOException
{
ObjectInputStream.GetField fields = s.readFields();
String path = (String)fields.get("path", null);
char sep = s.readChar();
}
}