Skip to main content
0 votes
2 answers
95 views

I'm working on a Java project where I need to write a large number of lines to a file. I know BufferedWriter can improve performance compared to writing character by character, but I am unsure about ...
Ahamed Shahif's user avatar
2 votes
2 answers
78 views

I'm writing via BufferWriter to a file. If I delete this file from the windows file system while the BufferWriter is still writing, the program doesn't report any error. Where does the BufferWriter ...
MaxSan's user avatar
  • 51
2 votes
2 answers
119 views

I'm working on a function to process some data and output the results as a csv file. I am using a 'use' block to wrap the function and ensure all the resources are closed. the problem I am running ...
pbuchheit's user avatar
  • 1,839
-4 votes
1 answer
66 views

I've googled around multiple options and still clueless on which is the best way to save data from csv file into database. I tried using: BufferedReader lineReader = new BufferedReader(new FileReader(&...
Meenal's user avatar
  • 147
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
84 views

I would like to present a scenario and discuss suitable design patterns to address it. Consider a simple situation: a camera records to a memory buffer for ten seconds before stopping. Once recording ...
rober_dinero's user avatar
0 votes
2 answers
166 views

I have a block to write data(string) using BufferedWriter, but compiler keeps saying error: unreported exception IOException; must be caught or declared to be thrown this.dataContainer.stream()....
limestreetlab's user avatar
0 votes
1 answer
109 views

I have built a game of text based BlackJack and am coding a bot to play the game and record the results. I have successfully launched the game and read the initial data from the console however once ...
Damon's user avatar
  • 1
0 votes
0 answers
59 views

I'm trying to write a large String that I have into a txt file, in said string there are a lot of \n and I'd like that to register as a new line in my txt file. I've tried to split the string whenever ...
P.noulis's user avatar
0 votes
0 answers
134 views

I am trying to test out a virtual serial connection in python with individual funtions for each test. ''' Testing Virtual Serial Port Connections ''' import os import sys import time import serial ...
Paul Bernard's user avatar
0 votes
2 answers
170 views

For my networking course, I am tasked with turning a OneWayMesg (Client sends messages to Server) program to a TwoWayMesg (Client sends messages to Server and Server sends messages to Client). In ...
ali's user avatar
  • 1
0 votes
1 answer
133 views

Problem Statement: Given an array of integers, answer queries of the form: [i, j] : Print the sum of array elements from A[i] to A[j], both inclusive This is the code I used: import java.io.*; import ...
Charan Guvvala's user avatar
0 votes
0 answers
35 views

I want to save a highscore in a database, but if an sql-exeption is thrown I want to temporary save the data in a file. The game has diffent modes and for each there is a highscore. I would like to ...
Cedric's user avatar
  • 1
1 vote
1 answer
1k views

In this example I'm trying to pass a BufWriter to some functions but don't understand generic type syntax enough to figure out whats missing. Instead of passing the file, I want to pass the buffered ...
Ross Youngblood's user avatar
0 votes
1 answer
181 views

I am trying to write to a file using BufferedWriter. As the write method takes int argument, I am casting input of double type into int type but it is not being written properly into the file. try{ ...
Amit Sur's user avatar

15 30 50 per page
1
2 3 4 5
51