Skip to main content
Filter by
Sorted by
Tagged with
1 vote
2 answers
135 views

I am trying to load data from Java object streams from another application. Since I do not have access to the source code of that application, I used jdeserialize to extract the class definitions from ...
uli's user avatar
  • 111
0 votes
2 answers
89 views

I’m working on a Java project where I need to save and load data (a list of Compte objects) using serialization. My method for loading the data looks like this: public static List<Compte> ...
Jad Belassiria's user avatar
0 votes
0 answers
126 views

I'm not sure what happened when saving a file, but now when I try to load it I get java.io.EOFException. All of the code is in try/catch blocks but there was no error when saving the file. Opening the ...
vincatzero's user avatar
0 votes
1 answer
68 views

I am trying to read objects from file to display them on a jpanel but I am having a hard time deserializing them. public static void saveFile(Screen screen) { JFileChooser find = new JFileChooser()...
Noah Gaston's user avatar
0 votes
1 answer
82 views

Java 21 Sockets allowing for multiple connections using ObjectInputStream and ObjectOutputStream produce EOF on second request I have a Client side, a (middleman) Bridge Server and an Inventory ...
JavaEnthusiast27's user avatar
0 votes
0 answers
81 views

I'm writing a large scale program in java where I keep track of the Nodes with different data structures. Specifically, one of my Node type have 2 left & right pointers for 2 different Binary ...
dgezgin's user avatar
  • 11
-1 votes
1 answer
83 views

public static void updateNumberOfEpsWatched() throws IOException, ClassNotFoundException { String currentDirectory = System.getProperty("user.dir"); ObjectInputStream in =...
Jacob Schweiger's user avatar
0 votes
0 answers
108 views

I am trying to use an ObjectOutputStream and an ObjectInputStream to store multiple BookLibrary objects in an ArrayList, but whenever I attempt to read in the data from the text file ("data.txt&...
ProfessorChicken's user avatar
1 vote
1 answer
95 views

I have a ServerMain and a ClientMain that give a Socket to a Client and a Server Thread. I then try to make ObjectStreams using the same method but I get an error. error for ServerMain: java.net....
hhhhhhhhhhhhhaaaaaaaaaauwu's user avatar
0 votes
1 answer
66 views

When using Java socket to transfer a file, I set byte[] BUFFER = new byte[1024 * 8], and using objectInputStream.read(BUFFER, 0, BUFFER.length) to receive file stream, but the return value of ...
Krlin Homon's user avatar
1 vote
1 answer
110 views

Send file with socket BIO use Socket, ServerSocket, ObjectInputStream and ObjectOutputStream but blocked. The detail code is: Model: @Data @ToString public class FileTransModel implements Serializable ...
Krlin Homon's user avatar
0 votes
1 answer
90 views

If the sender uses ois.writeObject to continuously send two objects of the same class to the receiver, and the receiver uses oos.readObject to read, is it possible for the receiver to treat the two ...
Mr Right's user avatar
0 votes
0 answers
35 views

The goal of this class is to be able to load when the program starts and save when data is changed. I have used these same methods before, the save and load ones. For some reason I can not get it to ...
Cole Baxendale's user avatar
0 votes
0 answers
45 views

I am trying to create an instance of the class Account and it cannot have the same handle as other accounts, which is checked using a for loop which compares the handle passed a parameter to the ...
Samuel W's user avatar
1 vote
1 answer
291 views

I have a Java program that is supposed to read independent serialized objects from a file (no interdependencies between the objects), process them, then write them as independent serialized objects to ...
Zarquan's user avatar
  • 123
1 vote
0 answers
563 views

After update from Gradle 6 to 7.x i cannot solve and find the cause of missing properties. For fields File and File Collection that being annotated @Input `Reason: A property of type 'File' annotated ...
One String Samurai's user avatar
0 votes
1 answer
191 views

Im returning a list of all the objects stored in some temporary files in my Android project. When the list its appended the file its deleted. public static <T> List<T> fileToLogList(...
Daniel Hernández's user avatar
1 vote
1 answer
46 views

I have an abstract Entity public class Entity<ID> { private ID id; public ID getId() { return id; } public void setId(ID id) { this.id = id; } } And a User ...
Flaviu's user avatar
  • 49
0 votes
1 answer
63 views

I'm trying to read objects from a file that I have written to but when reading there's an EOFException that gets thrown. I can see that it reads the objects but halfway through reading the file the ...
Avi's user avatar
  • 23
0 votes
0 answers
696 views

I'm trying to read an ArrayList of objects from a BinaryI/O but I keep getting the error "class java.lang.Boolean cannot be cast to class java.util.ArrayList (java.lang.Boolean and java.util....
Abbs's user avatar
  • 1
0 votes
1 answer
50 views

I am writing an I/O communication between one server (GameServer) and three clients (GameClient). After the server accepts three clients, it starts a separate thread (HandlePlayer). The HandlePlayer ...
Raine-Yang's user avatar
0 votes
1 answer
61 views

I'm saving objects from two array lists to a file and if I restart the application I have called a read method at the startup which will read the data from the file and add them to the array lists But ...
Ramal Abeysekera's user avatar
1 vote
0 answers
168 views

I initially created a file containing serialized data, and wanted to iterate through it and add the objects to a text file. However, I keep getting a StreamCorrupted error when I try doing so. Any ...
Sanjay Chunduru's user avatar
0 votes
0 answers
221 views

in java you could add the file within the project so you could use it on any device, i.e if the file is "data.dat" in java I could put the file in the project root and write this line try (...
Osama Abkar's user avatar
0 votes
1 answer
46 views

Source: while (true) { System.out.println("Waiting"); ois = new ObjectInputStream(socket.getInputStream()); System.out.println("Rcvd Stream"); client listener....
Saaketh's user avatar
  • 43
0 votes
0 answers
151 views

I am a beginner in java and practicing IO stream and Serialization .In below problem unable to read all data into a Arraylist and print it. by using the ObjectOutputStream insert the content by user ...
Tannu's user avatar
  • 1
0 votes
0 answers
297 views

I'm building software that passes objects over a TCP socket in Java - using the ObjectInputStream/ObjectOutputStream API. Although, after a minute of smooth communication I started to get the ...
dlev99's user avatar
  • 21
0 votes
1 answer
69 views

On a Spring Boot application (2.3.3), I have a dependency to a module developed by my company. From a service I'm calling a method from this dependency which needs a file loaded from resources (src/...
Antoine's user avatar
  • 570
0 votes
0 answers
113 views

I am making a program where user inputs his/her info and it is written in the file in binary form and after that we ask for a name whose info we want to get from the file. In that I take all the ...
Magnus Bane's user avatar
1 vote
1 answer
104 views

I try to use ObjectInputStream and ObjectOutputStream in my Java project but the object I want to send on the network contains other objects than String, int, boolean etc... so it does not work when I ...
Akashiro's user avatar
0 votes
1 answer
63 views

i have a class writeStudent like this: package test; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.io.ObjectInputStream; import java.io....
Dang Nam Duong K15 HCM's user avatar
1 vote
1 answer
151 views

I'm saving some Java objects in files. I seralize them that way : Class Timestamp.java: public class Timestamp implements java.io.Serializable { private static final long serialVersionUID = 1L; ...
E.F's user avatar
  • 199
0 votes
0 answers
45 views

so I have problem with my connection between Server module and Client module. I have 2 data classes to read it from ObjectInputStream and send with ObjectOutputStream unfortunatelly it can't find my ...
pandaman's user avatar
0 votes
1 answer
678 views

I am learning Java and I'm trying to get a programme to write the attributes of one class instance of another into a .txt file, like a phonebook for instance. I have a class User : package idpack; ...
VeraTuran's user avatar
0 votes
0 answers
53 views

I am trying to make a web servers cluster in Java. The first thing a server does after it starts running is ask another one to join the cluster. In this process, a copy of the WebServer object itself ...
Nikos Kont's user avatar
0 votes
0 answers
899 views

I have a problem with java.lang.Object stream. InputStream actually is a real Object[]. readObject method reads only one object. How can I read stream objects correctly? Sample code is below. ...
karatas.hakan's user avatar
-1 votes
1 answer
268 views

I am creating a Login Form and Sign up Form using JFrames. The problem is every time when the user presses the Sign up button the user details should be serialized and added to the "users.ser&...
Prasanth's user avatar
0 votes
0 answers
89 views

i have a server that work if change String with clients. Now,i want to use Object instead of String but the server doesn't receive anything and get stugged before the sout like the client doesn't sand ...
Matteo Pagliarello's user avatar
0 votes
1 answer
36 views

I am trying to read and write shape objects to a file for a drawing program, but when I try to read from the file it shows that the file is empty. The file is definitely being written to and updated, ...
Mr. Goose's user avatar
0 votes
1 answer
115 views

I'm trying to send files in chunks from a client to server via byte arrays. I'm using ObjectInputStream. The write works and the filesize matches but when I open the file, I only get a blank textfile(...
Arturo's user avatar
  • 301
0 votes
0 answers
499 views

I'm trying to convert Google Tink's KeysetHandle into byte [] and to construct the KeysetHandle back from the byte []. So here is the code I came up with //Two functions for the conversion public ...
Ebenezer Isaac's user avatar
0 votes
1 answer
572 views

So I have a working ObjectOutputStream in a method that I start by calling the method in main. I need to then read the file it created and print out all 5 objects in it. Right now I'm only printing ...
Skye Smith's user avatar
-1 votes
1 answer
5k views

I have a server and a client set up in this way. I can't find the cause of the EOFException, because it happens randomly. It throws the following exception every time a client connects, but I can't ...
Denes Garda's user avatar
1 vote
1 answer
758 views

i'm using the example from this repo https://github.com/kojenov/serial/tree/master/3-4.%20upload, which is presenting a method for specifying a way to protect form unsafe deserialization in Java by ...
chuchulski's user avatar
3 votes
0 answers
253 views

I am writing objects as needed to a file using ObjectOutputStream. However, I am only able to read the first object that is written to the file, even though several objects are added to the file. This ...
Raggen96's user avatar
1 vote
1 answer
444 views

I am making an instant messaging application where I set up a TLS connection between two phones where one acts as a Server and the other as the Client. When trying to send a message I get this ...
Ellen W's user avatar
  • 85
0 votes
0 answers
28 views

Hello does anyone know how to put a File object to a serializable object that can be passed through TCP connections? I currently have a Message object that can pass an Image and a String, now i want ...
Baked Lorelei's user avatar
0 votes
2 answers
549 views

I am writing a small program that inserts customer details in ArrayList and write it in file. The problem is with ObjectOutputStream I was able to append data in file with turning FileOutputStream(&...
MoinAhmad's user avatar
1 vote
2 answers
2k views

I have a method in an encryption class that is responsible for reading my RSA key files and there respective components. To do this is use an InputStream object with an ObjectInputStream object. These ...
FocusedTerror96's user avatar
0 votes
1 answer
68 views

I have read other questions similar to this but didn't help much. So I have some serialized content in a file and I am trying to read it and print it on the console, content is getting printed fine ...
user avatar

1
2 3 4 5
13