Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: markspace Newsgroups: comp.lang.java.programmer Subject: Re: store / load a non-serializable interface Date: Mon, 19 May 2014 16:36:13 -0700 Organization: A noiseless patient Spider Lines: 40 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Mon, 19 May 2014 23:36:14 +0000 (UTC) Injection-Info: mx05.eternal-september.org; posting-host="9358cda03e1e0dfd3c4b757daa608707"; logging-data="14757"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/bW/wkHcs5SKfzuMcXV747TewRj93U23g=" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 In-Reply-To: Cancel-Lock: sha1:ZKDkrQ3PZ/lTI01KaKccVfWz0xY= Xref: csiph.com comp.lang.java.programmer:28538 On 5/19/2014 1:01 PM, Philipp Kraus wrote: > Hello, > > I have got a non-serializable class and I would like to store / load > these objects. Extend it. public interface MyNewIFace extends myNonSerializableInterface, Serializable {} > So my idea > is creating a encapsulate the class: > I don't think this will work. > My problem is, that I don't know in which way I can restore the > interface object? You can if you extend it. This works too: public class MyClass implements myNonSerializeableInterface, Serializable { ... } But then you have to work with classes, not interfaces. > So I need to store the object name. No. > Can anybody help me to create a working > serializable structure? I'm a little bit confused at the moment to solve > the problem Google is your friend.