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

From markspace <markspace@nospam.nospam>
Newsgroups comp.lang.java.programmer
Subject Re: store / load a non-serializable interface
Date 2014-05-19 16:36 -0700
Organization A noiseless patient Spider
Message-ID <lle4he$ed5$1@dont-email.me> (permalink)
References <lldnvh$e29$1@online.de>

Show all headers | 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