Saturday, 7 September 2013

Can you serialize using a interface collection with interface entries?

Can you serialize using a interface collection with interface entries?

Suppose I have
public interface General extends Serializable {
...
}
and
public class Specific implements General {
...
}
Can I send and object of the type ArrayList<Specific> through an
ObjectOutputStream and deserialize it by casting to List<General>? Will
that work? If not, how should I do it?

No comments:

Post a Comment