Questions tagged [ioexception]

IOException is the general class of exceptions produced by failed or interrupted input/output operations in several languages, including Java and C#.

IOException is the general class of exceptions produced by failed or interrupted Input/Output operations in several languages, including Java and C# and other .NET languages.

1451 questions
-1
votes
1 answer

Project throwing IOException after readFile method call

I'm currently writing a program that will read in a CSV file that contains data about age, height, and weight. My issue is, when I call in the method that reads the file from the main, it throws an IOException. I'm not sure what's causing this, and…
Jrobb
  • 1
  • 2
-1
votes
1 answer

Java throws InvalidClassException while reading the stream

I want to read from a file using FileInputStream and ObjectInputStream. I have created BankAccount class which implements Externalizable interface and @overriden both its methods. I do not understand why it throws an IOException. These are the…
-1
votes
1 answer

how to solve java.awt.event.ActionListener does not throw IOException error?

I am trying to make that when my button "SaveImage " clicks it save my data into the given file name. when I try to run my save(PrintWriter write)into ActionListener it shows an error. My stacktrace actionPerformed (java.awt.event. ActionEvent)…
-1
votes
2 answers

Console.Clear() stops method execution (IOException is not reached)

I'm having a very weird behaviour from this method: public T NavigateTo() where T : Page { SetPage(); Console.Clear(); CurrentPage.Display(); return CurrentPage as T; } From:…
z3nth10n
  • 2,341
  • 2
  • 25
  • 49
-1
votes
1 answer

Executing a java command on linux from a java code running on java 7

i am trying to run a jar file on a linux machine which contains a java code which is trying to execute another .jar file. After going through forum suggestions i tried to create a symbolic link between "/usr/bin/java" and …
-1
votes
1 answer

java.io.IOException: Rethrown as IOE

While trying to hit a simple HTTPS web service (GET) request getting the below Java IO exception, but while I hit the same HTTPS URL on browser getting successful response. Also for the HTTP GET request it is working fine java.io.IOException:…
Arun
  • 1
  • 1
-1
votes
2 answers

Android: External Write Permissions

I've been trying to read and write to a text file from Android studio, and keep getting the "Permission denied" exception. I've read through the different posts,and still can't seem to solve it. My code: public void buttonSave(View view) { …
-1
votes
1 answer

How to get rid of an exception "IOException: File '... ... ... .pdf' cannot be written to"

I want to download a PDF-file from the link and open it in the pdf-reader. For this I indicated: in the manifesto:
-1
votes
1 answer

Getting unhandled IOException on globally defined variable - JAVA

How can one stop the IOException question being raised on something as such: public class ExampleClass { String path = "path to directory"; Path filePath = Paths.get(path); BasicFileAttributes Attr = Files.readAttributes(filePath,…
physicsboy
  • 5,656
  • 17
  • 70
  • 119
-1
votes
2 answers

MapReduce IOException

I write such code for MapReduce text sorting: public static class SortMapper extends Mapper { private Text citizenship = new Text(); @Override public void map(Object key, Text value, Context context) throws…
Jack Loki
  • 95
  • 6
-1
votes
1 answer

How to get rid of Drive is not ready message box?

I have a malfunctioning USB stick that keeps connecting and disconnecting all the time with interval around 500ms, to save the files I have written a piece of software that copies files byte by byte, whenever USB stick disconnects, the software…
Movsar Bekaev
  • 888
  • 1
  • 12
  • 30
-1
votes
1 answer

I'm trying to save and load choices and its giving me the same error over and over

I keep getting The process cannot access the file another process is using it Can someone tell me what's wrong? public void SaveCheckedChoices() { using(StreamWriter writer = new StreamWriter(dataFile)) { try { …
-1
votes
2 answers

Avoid "file in use by another process" IO exception

The code that I have included below successfully writes to a CSV file. But if the CSV file that I am writing to happens to be open in Excel, I get a System.IO.Exception that indicates that "the file is being used by another process." How can I…
-1
votes
1 answer

close() method of the InputStream class

Hello World!, I have a question regarding the close() method of the Input Stream class. Here is my code -> public class Main{ InputStream consoleInputStream = System.in; byte[] bytes = new byte[2]; …
Summi
  • 63
  • 8
-1
votes
1 answer

IOException when using InputStreamReader

When the below section of code is executed in my program I get an IOException. try(BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(logStorageUrl.openStream()))) { String currentLine; …