Questions tagged [serializable]

Serialization is the process of converting a data structure or object state into a format that can be stored. The `SerializableAttribute` is a .NET Framework attribute that signifies the object is serializable. The `Serializable` Java marker interface indicates that an object can be serialized using standard JVM serialization mechanisms. Other languages and frameworks have similar abstract classes or attributes.

Serialization is the process of converting a data structure or object state into a format that can be stored.

The SerializableAttribute is a .NET Framework attribute that signifies the object is serializable. Other languages and frameworks have similar abstract classes or attributes.

The Serializable Java marker interface indicates that an object can be serialized using standard JVM serialization mechanisms.

Other uses of this tag should probably use .

891 questions
0
votes
1 answer

Serializability of injected CDI bean into stateful EJB

I've got stateful EJB and injected to it application scope CDI bean. Findbugs gave a warning, because my CDI bean was not serializable. Should the CDI bean be serializable in this case? In my opinion it shouldn't, in order to avoid passivation. Is…
mmatloka
  • 1,986
  • 1
  • 20
  • 46
0
votes
1 answer

Java : Serializing an Object with Primitive Types. Get error java.io.NotSerializableException

The Class definition private class classSerial implements Serializable { private static final long serialVersionUID = 1L; String vString; boolean vBool; long vLong; int vInt; classSerial(){ //initialize members; …
ThinkingMonkey
  • 12,539
  • 13
  • 57
  • 81
0
votes
1 answer

Adding [DataContract] to class with [Serializable] causes problems

I am using the DataContractSerializer to persist objects. Most classes have the [DataContract] attribute but one (not sure why) has [Serializable]. The properties of this class have the [DataMember] attribute. So far, it has worked ok. Recently, I…
paul
  • 13,312
  • 23
  • 81
  • 144
0
votes
1 answer

how to pass Arraylist from one activity to another?

i have two activities named "Activity A" and "Activity B". In my Activity A i need to pass Arraylist to Activity B. Here is Activity A code.... Arraylist list; list.add(new BeanClass(nm, Add, Phn)); Intent i = new…
Harsh Lakhani
  • 125
  • 1
  • 6
0
votes
2 answers

Start intent with Serializable from within the serializable class

I am trying to start up an Intent from within a class which implements Serializable. I get a IOException which says "Parcelable encountered IOException wrinting Serializable object". This is what i am trying to do from within a method in the class…
AlexanderNajafi
  • 1,631
  • 2
  • 25
  • 39
0
votes
1 answer

android Serializable

i have a class which implement Serializable. when i'm adding an object from that class to the Intent extra and lunch an activity i have no problems. but when i'm trying to add the object to an Intent lunched by a PedingIntent in a notificatoin bar,…
Asaf Nevo
  • 11,338
  • 23
  • 79
  • 154
0
votes
2 answers

Serialize a class using SpringLayout (Java)

I recently started developing in Java and have enjoyed the experience a lot. The default Java package comes loaded with useful things, and having the Swing package has been a great help creating a GUI. I decided to use SpringLayout for my…
MandM
  • 3,293
  • 4
  • 34
  • 56
0
votes
1 answer

Replace file in ZipOutputStream

I would like to create zip file. File will contains exported Preferences and Serializable object. But when i try replace Object in zip archive saved Preferences disapear. How solve this problem? import java.io.BufferedOutputStream; import…
user902691
  • 1,149
  • 4
  • 20
  • 46
0
votes
1 answer

Any ideas for flexible serialization

I have some objects that serialized to output. Some properties of the object are heavy to calculate and take some time to do that. What I'm thinking about is how to specify the set of properties that user want to get and serialize only that set…
Mr. Pumpkin
  • 6,212
  • 6
  • 44
  • 60
0
votes
3 answers

Issue with getters and setters Methods

Hello I am working on the google NewsReader Application Using SAX, Here I am using getters and setters methods for get the data. But I have issue that I could add the value into the setters methods but could not get into the getters methods, I…
Rahul Patel
  • 3,823
  • 5
  • 30
  • 46
0
votes
1 answer

Sending a bundle to other process

I am using the following code to serialize an object and to attach it to a bundle via putSerializable, then sending the bundle to other process via a Message. The problem is that I get an error that the object is not serializable. i tried adding…
Simon
  • 509
  • 7
  • 25
0
votes
1 answer

I can't recover a Calendar using getSerializableExtra of an Intent

I putExtras in Activity A: notificationIntent.putExtra(KEY_ID, id); notificationIntent.putExtra(KEY_CALENDAR, day); A.logCalendar("calendar: ", day); // the Calendar is not null at this point I getExtras en Activity B: int id =…
Alpha75
  • 2,140
  • 1
  • 26
  • 49
0
votes
4 answers

How to send list via sockets java

i am trying to send an Object via socket. its object Net public class Net { public List objects; //= new ArrayList(); // place + transition public List arcs; // = new ArrayList(); // arcs -…
Anton Giertli
  • 896
  • 2
  • 10
  • 29
-1
votes
2 answers

Problem understanding Serializable

just started using the Serializable-thingy, I want to save a couple of lists and some other objects, but I can't seem to get some things right. I have some JLists with their own "DefaultListModel" that I use to sort things in the list, I call the…
XistenZ
  • 309
  • 1
  • 4
  • 14
-1
votes
1 answer

JavaFX 8 CheckBox serialization

I have object like class Person extends Human implements Serializable{ //just random example String name; CheckBox check; //other functions with checkbox and name } and I want to serialize whole CheckBox object. I found out that it´s not possible…