Skip to main content
-3 votes
3 answers
217 views

I came across a class extending java.io.File. While this looked very peculiar to me, I couldn't find any documentation of whether the File class is meant to be overridden. Note that the class is not ...
MC Emperor's user avatar
  • 23.3k
-2 votes
1 answer
142 views

There is an existing api which writes the file to particular location and the code snippet is like below: long lastUpdatedOn = System.currentTimeMillis(); try(...
Amit J.'s user avatar
  • 38
0 votes
0 answers
59 views

I have code that has two warnings. The code is from a commandline Expense manager project that uses a List to save and access expenses. Saving and retrieving the List is done via serialisation and ...
Andruid929's user avatar
1 vote
1 answer
102 views

I had success looping through my 5 database rows and writing a CSV file, except the code that I used rewrote the file every line. I will use the CSVParser to read the file to import an activity from ...
curtjacobs1's user avatar
0 votes
0 answers
17 views

I am pretty new to java and I am trying to import some classes into my Java project, particularly java.sql and java.io.FileWriter + java.io.BufferedWriter In my module-info.java, I have added the ...
kaushyy's user avatar
  • 11
1 vote
1 answer
68 views

I am a beginner in java and trying to solve the below use case. Use case : From a file(input.txt) having numbers, find out and write all the unique numbers to a different file(output.txt) without ...
Suraj Kumar Sahani's user avatar
4 votes
1 answer
99 views

There are a few related questions, but none of them quite provides the answer. I provide a Serializer object, and it has a method setOutputStream() allowing the user to supply a destination for the ...
Michael Kay's user avatar
0 votes
1 answer
118 views

Im trying to build my quarkus application in native mode using a dependency called EsperTech, and there is a specific snippet of code that after countless hours of debugging I discover that is causing ...
Caio Fernandes's user avatar
1 vote
1 answer
633 views

I need to use ActionUploadFileInterceptor. I implement UploadedFilesAware and need to convert UploadedFile to File. I write a method for convertUploadedFileToFile. Is there any better way to convert ...
Setareh Mokhtari's user avatar
5 votes
0 answers
573 views

I am thoroughly learning Spring Boot and I am learning how to upload files and in my example I will be storing the path in the database and the contents in the file system outside of what is publicly ...
theMyth's user avatar
  • 288
-2 votes
3 answers
157 views

I have multiple images (.jpg/.jpeg/.png) in form of Spring's MultiPartFile. I need to transform them into a single MultiPartFile with images places vertically - preferably PDF, but other image formats ...
mar3g's user avatar
  • 132
1 vote
2 answers
243 views

I’m working on a character recognition project using Java and IntelliJ IDEA. My program needs to load training and testing data from CSV files, but I’m encountering a FileNotFoundException even though ...
senurah's user avatar
  • 27
0 votes
0 answers
47 views

I am trying to read several doubles from a file and save them in an array. The first number in the file is an integer, which should then determine the size of the array. This works. but when I try to ...
Szihuma's user avatar
2 votes
1 answer
81 views

I got this code adapted from the official Java-Tutorial Page Console - Java Tutorial public class RedirectOutputStreamExample { public static void main(String[] args) throws InterruptedException { ...
Yoo oo's user avatar
  • 103
0 votes
0 answers
53 views

I need to send and read some bytes from Bluetooth, like serial port. I use next code to connect device: UUID uuid = UUID.fromString("00001101-0000-1000-8000-00805f9b34fb"); ...
user1786639's user avatar

15 30 50 per page
1
2 3 4 5
119