Skip to content

java.io.FileNotFoundException error when writing into txt file #1

Open

Description

@nefelimet

When receiveImage() tries to write into the txt files, this error occurs:

An error occurred.
java.io.FileNotFoundException: imageWithError.txt (Δεν ήταν δυνατή η προσπέλαση του αρχείου από τη διεργασία, επειδή χρησιμοποιείται ήδη από κάποια άλλη διεργασία)
at java.base/java.io.FileOutputStream.open0(Native Method)
at java.base/java.io.FileOutputStream.open(FileOutputStream.java:291)
at java.base/java.io.FileOutputStream.(FileOutputStream.java:234)
at java.base/java.io.FileOutputStream.(FileOutputStream.java:155)
at java.base/java.io.FileWriter.(FileWriter.java:82)
at userApp.writeToFile(userApp.java:95)
at userApp.receiveImage(userApp.java:170)
at userApp.demo(userApp.java:220)
at userApp.main(userApp.java:19)

However, the program continues execution and does create the txt files correctly. The jpeg files have no problem.
I can just comment out the txt files part since we no longer need it anyway, but it would be nice to know the reason behind this.

Activity

  1. nefelimet commented on Apr 22, 2021

    @nefelimet
    OwnerAuthor

    This only happened on txt files. I commented out the creation of txt files in receiveImage(), since it isn't needed anymore. It was only needed in the beginning when we needed to check the image's bytes.
    I'm labeling this as wontfix since it's not important.

  2. added a commit that references this issue on Apr 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    wontfixThis will not be worked on

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions