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
6
votes
2 answers

What to do with an IOException in WebViewClient.shouldInterceptRequest()

I am trying to intercept requests from a WebView so that I can inject extra headers. I am applying a WebViewClient to the WebView and overriding shouldInterceptRequest(). In shouldInterceptRequest() I open the connection, add the headers, and then…
Graham Borland
  • 60,055
  • 21
  • 138
  • 179
6
votes
2 answers

Emulate waiting on File.Open in C# when file is locked

I have, essentially, the same problem as this poster, but in C#: Waiting until a file is available for reading with Win32 More information: we have code that calls File.Open in one of our projects, that occasionally dies when the file is already…
Blair Holloway
  • 15,969
  • 2
  • 29
  • 28
6
votes
3 answers

Handling different exceptions of the same type in Java?

When handling errors in Java it's common to see the superclasses being the errors that are caugh, such as Exception, IOException, SocketException, etc. However how do you go about finding the nitty-gritty details on the exception? How do you single…
Hobbyist
  • 15,888
  • 9
  • 46
  • 98
6
votes
4 answers

when does java.util.zip.ZipFile.close() throw IOException?

Under what circumstances would java.util.zip.ZipFile.close() throw an IOException? Its method signature indicates that it can be thrown, but from the source code there doesn't seem to be any place where this could happen, unless it's in native code.…
sk.
  • 6,336
  • 5
  • 38
  • 46
6
votes
1 answer

Getting IOException Push back buffer is full while trying to unzip a String value using ZipInputStream

I am trying to unzip a String value. But I am getting a java.io.IOException: Push back buffer is full: public byte[] unzipArray(String stringToUnzip) { byte[] inputByteArray = Base64.decode(stringToUnzip); …
Radhika
  • 423
  • 7
  • 22
6
votes
2 answers

Android: Nexus One - Geocoder causes IOException - works perfectly with other devices and emulator

The code below works perfectly for real devices running on 1.5, 1.6 and 2.0 as well as the emulator running on 2.1. However, executing it on the Nexus One (running 2.1) raises an IOException: java.io.IOException: Unable to parse response from…
znq
  • 44,613
  • 41
  • 116
  • 144
6
votes
3 answers

Scala run process on different working dir

I can't use Process("dir/e.exe") because e needs to be executed on its own directory, if not it can't access to its resources. But i receive an exception whenever i try to change the working directory: Process("e.exe", new File(dir))…
Wlofrevo Kcast
  • 629
  • 1
  • 6
  • 11
6
votes
3 answers

Reading a file without causing IOException on 3rd party program

I'm reading a file which is periodically being written to by a 3rd party program. Im reading using the below FileStream: using (FileStream fs = new FileStream( FullPath, FileMode.Open, …
CathalMF
  • 9,705
  • 6
  • 70
  • 106
6
votes
1 answer

WebRequest.Create throws IOException "The specified registry key does not exist."

I am calling this line of code to get to the azure server: var request = (HttpWebRequest)WebRequest.Create(uri); and receive this exception. Does anybody know how to manage with it? mscorlib.dll!Microsoft.Win32.RegistryKey.Win32Error(int errorCode,…
Alex Blokha
  • 1,141
  • 2
  • 17
  • 30
6
votes
2 answers

IOException I can’t catch

I have an application talking to a USB-GPS. It’s working as a charm if nothing out of the ordinary happnes. But I have a big problem. If the USB gets pulled out, my program (some times) crashes. I have Try/Catch where I need them but this IOExeption…
Nick3
  • 639
  • 1
  • 14
  • 40
6
votes
1 answer

Crawling using Nutch...Shows an IOException

I've started using Nutch and everything was fine until I encountered an IOException exception, $ ./nutch crawl urls -dir myCrawl -depth 2 -topN 4 cygpath: can't convert empty path solrUrl is not set, indexing will be skipped... crawl started in:…
python-coder
  • 2,128
  • 5
  • 26
  • 37
6
votes
4 answers

IOException - Cannot load file

I have an app that shows GIF images. It all works fine if image is saved in drawable, and I access it like this is=context.getResources().openRawResource(R.drawable.mygif); movie = Movie.decodeStream(is); But I need to download image from internet,…
Bojan Kogoj
  • 5,321
  • 3
  • 35
  • 57
5
votes
2 answers

Process cannot access the file because it is being used by another process on Directory.Move()

We have a client application with the following architecture: a manager process manages a couple of worker processes (reader and writer) and periodically queries the server for version updates. If a version update is available, the manager downloads…
Mr Mush
  • 1,538
  • 3
  • 25
  • 38
5
votes
1 answer

getting response code from HttpURLConnection in android

i am establishing connection with the server and its working fine. But there are times when i try to get the response code (when server is throwing back 401, 403, 404) i am getting IO Exception. I am handling everything based on the response code.…
Arun
  • 1,658
  • 1
  • 14
  • 21
5
votes
4 answers

c# file move and overwrite

I'm developing a multi threaded application. I have somewhere in my code : File.Delete(sidetapedata); File.Move(sidetapedata2, sidetapedata); //sidetapedata and sidetapedata2 are two file paths that correspond to sidetapedata.txt and…
prongs
  • 9,422
  • 21
  • 67
  • 105