Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #28538

Re: store / load a non-serializable interface

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 <markspace@nospam.nospam>
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 <lle4he$ed5$1@dont-email.me> (permalink)
References <lldnvh$e29$1@online.de>
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 <lldnvh$e29$1@online.de>
Cancel-Lock sha1:ZKDkrQ3PZ/lTI01KaKccVfWz0xY=
Xref csiph.com comp.lang.java.programmer:28538

Show key headers only | View raw


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.

Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

store / load a non-serializable interface Philipp Kraus <philipp.kraus@flashpixx.de> - 2014-05-19 22:01 +0200
  Re: store / load a non-serializable interface markspace <markspace@nospam.nospam> - 2014-05-19 16:36 -0700
  Re: store / load a non-serializable interface Arne Vajhøj <arne@vajhoej.dk> - 2014-05-19 19:54 -0400
    Re: store / load a non-serializable interface Philipp Kraus <philipp.kraus@flashpixx.de> - 2014-05-20 07:01 +0200

csiph-web