Files
narya/src/java/com/threerings/presents/io/LongFieldMarshaller.java
T
Michael Bayne 8a4c46badc The first great Three Rings renaming. Cocktail changed to Narya, Cher
changed to Presents and Party changed to Crowd. Whee!


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@431 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-10-11 04:07:54 +00:00

30 lines
796 B
Java

//
// $Id: LongFieldMarshaller.java,v 1.4 2001/10/11 04:07:52 mdb Exp $
package com.threerings.presents.dobj.io;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;
import java.lang.reflect.Field;
import com.threerings.presents.dobj.DObject;
public class LongFieldMarshaller implements FieldMarshaller
{
/** This is the sort of field that we marshall. */
public long prototype;
public void writeTo (DataOutputStream out, Field field, DObject dobj)
throws IOException, IllegalAccessException
{
out.writeLong(field.getLong(dobj));
}
public void readFrom (DataInputStream in, Field field, DObject dobj)
throws IOException, IllegalAccessException
{
field.setLong(dobj, in.readLong());
}
}