Skip to content

Instantly share code, notes, and snippets.

@pmanvi
Created September 24, 2011 18:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pmanvi/1239678 to your computer and use it in GitHub Desktop.
Save pmanvi/1239678 to your computer and use it in GitHub Desktop.
VERSION = 0;
@Override
public void writeExternal(ObjectOutput out) throws IOException {
out.writeInt(VERSION);
out.writeInt(number);
out.writeObject(name);
}
@Override
public void readExternal(ObjectInput _in) throws IOException, ClassNotFoundException {
ObjectInputWrapper in = new ObjectInputWrapper(_in);
VERSION = in.readInt();
number = in.readInt();
name = (String) in.readObject();
}
"Test{VERSION=0, number=10, name=praveen}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment