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
-2
votes
1 answer

Open a file from SD card in android

To open a file from android application asset folder I used below code: InputStream fis = getApplicationContext().getAssets().open(filename); Same thing I want to open a file from SDcard... How to do?
Prasad
  • 1,375
  • 5
  • 17
  • 31
-2
votes
1 answer

Throwing custom exception and problems with {} in java with eclipse

I'm trying to create custom exceptions for my application. It generates a random number, takes a character from BufferedReader, associates the character with an int through an enum, and outputs whether or not the int is higher, lower, or equals to…
Spitz
  • 63
  • 1
  • 9
-2
votes
1 answer

Trying to create a multithreaded broadcasting server - gets IOException

I'm trying to create a multithreaded broadcasting server. I have one class called ClientHandler that implements Runnable, and each instance of this class handles a single connection to a client. My server has a HashSet called connectedClients, that…
Jonatan Stenbacka
  • 1,824
  • 2
  • 23
  • 48
-2
votes
1 answer

Catching Same IOException Inside Catch IOException Block

My Android code is behaving funny. The input stream should and does throw an IOException, which correctly causes control to go to // read an error stream. The error stream is read correctly and the debugger steps to return error_message with the…
necromancer
  • 23,916
  • 22
  • 68
  • 115
-2
votes
2 answers

Why do I get this "unreported Exception"?

It's weir that this is happening, because as I see it, everything's correct. If you can help me, I'll be thankful Here's the code: import java.io.*; import java.net.*; import java.util.*; import javax.swing.*; import java.sql.Connection; import…
-2
votes
3 answers

How to read and write text files from the main in java

The static method main, which receives an array of strings. The array should have two elements: the path where the files are located (at index 0), and the name of the files to process (at index 1). For example, if the name was “Walmart” then the…
user2888784
  • 13
  • 1
  • 4
-2
votes
1 answer

AlertDialog on Android IOException

I´m developing an app which needs to connect to a server to actually work. That means when the server is not working, it should show a message to the user and close the app. Right now when it happens the app throws an IOException, and the app stops…
-3
votes
1 answer

How to resolve "System.IO.IOException: The process cannot access the file because it is being used by another process" error in C# .NET?

I am working on a C# .NET application where I need to read and write files. However, I am encountering the error "System.IO.IOException: The process cannot access the file because it is being used by another process" when trying to access a file…
-3
votes
4 answers

Getting IOException, cant find any reason

I tried to read rgb of specific pixels however i was getting IOException. I couldnt find any reson so yet i tried to run program from this site link but im still getting IOException. So can this be because of JRE or my IDE which is Eclipse? import…
Pirey
  • 23
  • 2
-3
votes
1 answer

Unhandled exception type IOException at CorrectLogin();

`public void actionPerformed(ActionEvent e) { if(e.getSource()==EnterLogin) { CorrectLogin(); } } private void CorrectLogin() throws IOException { String filename = ("accounts.txt"); FileReader fr1= new FileReader…
-3
votes
1 answer

IOException: Not enough quota is available to process this command

I use Netbeans (8.1) to test small code snippets, but today all of a sudden, I have been getting an IOException, even with a simple "Hello World" program. I found similar questions such as this, and this but none seem to solve my issue. My memory…
achAmháin
  • 4,176
  • 4
  • 17
  • 40
-3
votes
1 answer

Unhandled IOException when trying to execute an external program from Java

I want to make my program to execute this installer (SnakeInstaller.exe). I am using the Runtime class but I get an unhandled IOException and when I run the code i get an error: Exception in thread "AWT-EventQueue-0" java.lang.Error: Unresolved…
Weston
  • 1
-3
votes
1 answer

How do I write to and read from External Storage directory of all devices?

I have a problem with writing files to the external storage directory. I have added the permissions. The code works fine in some devices while it crashes in others. The error I get is a java.io.IOException: open failed: ENOENT (No such file or…
-3
votes
1 answer

I can't write to /mnt/sdcard2 in Android

Now I'm making some version of File Manager in Andoid. My permission: When I write new file to…
-3
votes
1 answer

Don't know how to handle FileWriter exceptions

In my code, one of my methods says: this.write("stuff") and the write method is public void write(String text) throws IOException { FileWriter writer = new FileWriter(path, true); PrintWriter printer = new PrintWriter(writer); …
Andriy F.
  • 15
  • 1
  • 2
1 2 3
96
97