/** * By default, unwraps IndirectlySerialized objects, returning the original */ public static Object fromByteArray(byte[] bytes) throws IOException, ClassNotFoundException { Object out = deserializeFromByteArray( bytes ); if (out instanceof IndirectlySerialized) return ((IndirectlySerialized) out).getObject(); else return out; }
public static Object deepCopy( Object o ) throws IOException, ClassNotFoundException { byte[] bytes = serializeToByteArray( o ); return deserializeFromByteArray( bytes ); }
public static Object fromByteArray(byte[] bytes, boolean ignore_indirects) throws IOException, ClassNotFoundException { if (ignore_indirects) return deserializeFromByteArray( bytes ); else return fromByteArray( bytes ); }
private void readObject(ObjectInputStream in) throws IOException { short version = in.readShort(); switch (version) { case 0x0001: this.value = in.readInt(); break; default: throw new UnsupportedVersionException(this, version); } } }
public static Object testSerializeDeserialize( Object o ) throws IOException, ClassNotFoundException { return deepCopy( o ); }
/** * By default, unwraps IndirectlySerialized objects, returning the original */ public static Object fromByteArray(byte[] bytes) throws IOException, ClassNotFoundException { Object out = deserializeFromByteArray( bytes ); if (out instanceof IndirectlySerialized) return ((IndirectlySerialized) out).getObject(); else return out; }
public static Object fromByteArray(byte[] bytes, boolean ignore_indirects) throws IOException, ClassNotFoundException { if (ignore_indirects) return deserializeFromByteArray( bytes ); else return fromByteArray( bytes ); }
private void readObject(ObjectInputStream in) throws IOException { short version = in.readShort(); switch (version) { case 0x0001: this.value = in.readInt(); break; default: throw new UnsupportedVersionException(this, version); } } }
public static Object deepCopy( Object o ) throws IOException, ClassNotFoundException { byte[] bytes = serializeToByteArray( o ); return deserializeFromByteArray( bytes ); }
public static Object testSerializeDeserialize( Object o ) throws IOException, ClassNotFoundException { return deepCopy( o ); }
/** * By default, unwraps IndirectlySerialized objects, returning the original */ public static Object fromByteArray(byte[] bytes) throws IOException, ClassNotFoundException { Object out = deserializeFromByteArray( bytes ); if (out instanceof IndirectlySerialized) return ((IndirectlySerialized) out).getObject(); else return out; }
public static Object fromByteArray(byte[] bytes, boolean ignore_indirects) throws IOException, ClassNotFoundException { if (ignore_indirects) return deserializeFromByteArray( bytes ); else return fromByteArray( bytes ); }
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { short version = in.readShort(); switch (version) { case 0x0001: this.username = (String) in.readObject(); this.password = (String) in.readObject(); break; default: throw new UnsupportedVersionException(this, version); } } }
public static Object deepCopy( Object o ) throws IOException, ClassNotFoundException { byte[] bytes = serializeToByteArray( o ); return deserializeFromByteArray( bytes ); }
public static Object testSerializeDeserialize( Object o ) throws IOException, ClassNotFoundException { return deepCopy( o ); }
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { short version = in.readShort(); switch (version) { case 0x0001: this.username = (String) in.readObject(); this.password = (String) in.readObject(); break; default: throw new UnsupportedVersionException(this, version); } } }
private void readObject(ObjectInputStream in) throws IOException { short version = in.readShort(); switch (version) { case 0x0001: this.value = in.readLong(); break; default: throw new UnsupportedVersionException(this, version); } } }
private void readObject(ObjectInputStream in) throws IOException { short version = in.readShort(); switch (version) { case 0x0001: this.value = in.readBoolean(); break; default: throw new UnsupportedVersionException(this, version); } } }
private void readObject(ObjectInputStream in) throws IOException { short version = in.readShort(); switch (version) { case 0x0001: this.value = in.readChar(); break; default: throw new UnsupportedVersionException(this, version); } } }
private void readObject(ObjectInputStream in) throws IOException { short version = in.readShort(); switch (version) { case 0x0001: this.value = in.readShort(); break; default: throw new UnsupportedVersionException(this, version); } } }