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
10
votes
3 answers

java.io.IOException: Stream closed

For multiple image retrieval I am calling a PhotoHelperServlet with an anchor tag to get imageNames(multiple images) as follows PhotoHelperServlet to get names of Images protected void doGet(HttpServletRequest request, HttpServletResponse response)…
a k
  • 797
  • 8
  • 15
  • 24
10
votes
1 answer

Spring Boot - Lot of invalid requests and Socket accept failed java.io.IOException: Too many open files

I have running machine with Spring (Spring Boot 1.5.2.RELEASE) application. Recently I'm receiving a lot of warnings in my log file: .w.s.m.s.DefaultHandlerExceptionResolver : Failed to read HTTP message:…
user3626048
  • 706
  • 4
  • 19
  • 52
10
votes
1 answer

xml pull parser assets xml

How can i parse a local XML file in the assets folder using pull parser? I can't get pull parser to work. It always throws an io exception. I think I can't get the path to the file, or connecting to the file.
mixm
  • 531
  • 2
  • 4
  • 18
10
votes
3 answers

java.io.FileNotFoundException for valid URL

I use library rome.dev.java.net to fetch RSS. Code is URL feedUrl = new URL("http://planet.rubyonrails.ru/xml/rss"); SyndFeedInput input = new SyndFeedInput(); SyndFeed feed = input.build(new XmlReader(feedUrl)); You can check that…
Alexei
  • 231
  • 1
  • 2
  • 11
10
votes
6 answers

Java: what are IOEXceptions in BufferedReader's readLine() for?

I can "fix" the below exception with a try-catch loop but I cannot understand the reason. Why does the part "in.readLine()" continuosly ignite IOExceptions? What is really the purpose of throwing such exceptions, the goal probably not just more…
hhh
  • 50,788
  • 62
  • 179
  • 282
10
votes
1 answer

How to distinguish programmatically between different IOExceptions?

I am doing some exception handling for code which is writing to the StandardInput stream of a Process object. The Process is kind of like the unix head command; it reads only part of it's input stream. When the process dies, the writing thread fails…
ChaseMedallion
  • 20,860
  • 17
  • 88
  • 152
10
votes
1 answer

HttpURLConnection: how to read payload of 400 response

I use the following code to send a JSON request to my web service, and, for a bad request I return a 400 message code along with a detailed JSON error response in the payload. I do not understand how I could possibly retrieve this payload on the…
user1578796
  • 157
  • 1
  • 1
  • 12
10
votes
3 answers

Java Try and Catch IOException must be caught or declared to be thrown

I am trying to use a bit of code I found at the bottom of this page. Here is the code in a class that I created for it: import java.io.LineNumberReader; import java.io.FileReader; import java.io.IOException; public class LineCounter { public…
ubiquibacon
  • 10,451
  • 28
  • 109
  • 179
10
votes
1 answer

How can closing a FileInputStream cause a "No Space Left on Device" error?

I am a bit confused with an error my program started throwing recently. java.io.IOException: No space left on device at java.io.FileInputStream.close0(Native Method) at java.io.FileInputStream.close(FileInputStream.java:259) at…
Judicator
  • 133
  • 1
  • 8
10
votes
7 answers

Using jobb tool in Android

I am running the following command to get my encrypted obb file for apk expansion. jobb -d /home/manoj/Desktop/Test -o main.1.com.example.helloworld.obb -k "manoj" -pn com.example.helloworld -pv 1 I am getting following exception. Please tell what…
Techie Manoj
  • 432
  • 3
  • 14
9
votes
6 answers

how to best wait for a filelock to release

I have an application where i sometimes need to read from file being written to and as a result being locked. As I have understood from other questions i should catch the IOException and retry until i can read. But my question is how do i know for…
Tjelle
  • 986
  • 1
  • 9
  • 17
9
votes
2 answers

Android Error : java.io.IOException: CreateProcess error=2, The system cannot find the file specified

I am getting the following error while building one e-commerce application. It is Building Successfully but when I try to run this application, Giving me error as following: My build.gradle having following dependencies: dependencies { …
Pratik Butani
  • 60,504
  • 58
  • 273
  • 437
9
votes
11 answers

How to create a Java Iterator that throws IOException

I'd like to implement an iterator that retrieves objects from disk/network. Iterator itr = getRemoteIterator(); while(itr.hasNext()) { Object element = itr.next(); System.out.print(element + " "); } However the problem is that hasNext() and…
Anthony
  • 12,407
  • 12
  • 64
  • 88
9
votes
3 answers

java.io.IOException: The system cannot find the path specified writing a textfile

I'm writing a program where I'm trying to create a new text file in the current directory, and then write a string to it. However, when trying to create the file, this block of code: //Create the output text file. File outputText = new…
Inglonias
  • 468
  • 1
  • 5
  • 18
9
votes
2 answers

java.io.IOException: No space left on device Android

We have application on android market, our users getting a lot from this error: java.io.IOException: No space left on device From what I found out so far, I know that they got enough space left on they external storage, and it's only happen on…
Ilya Gazman
  • 31,250
  • 24
  • 137
  • 216