1 23 24 package org.objectweb.fractal.rmi.io; 25 26 import java.io.Externalizable ; 27 import java.io.IOException ; 28 import java.io.ObjectInput ; 29 import java.io.ObjectOutput ; 30 31 35 36 public class Ref implements Externalizable { 37 38 41 42 public String type; 43 44 49 50 public byte[] id; 51 52 55 56 public Ref () { 57 } 58 59 public void writeExternal (final ObjectOutput out) throws IOException { 60 out.writeUTF(type); 61 out.writeInt(id.length); 62 out.write(id); 63 } 64 65 public void readExternal (final ObjectInput in) 66 throws IOException , ClassNotFoundException 67 { 68 type = in.readUTF(); 69 id = new byte[in.readInt()]; 70 in.readFully(id); 71 } 72 } 73 | Popular Tags |