Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8523423
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T07:24:20+00:00 2026-06-11T07:24:20+00:00

I have a process in which very sporadically I’m creating files which for reasons

  • 0

I have a process in which very sporadically I’m creating files which for reasons that I can’t yet figure out I get a “java.io.FileNotFoundException: File is not a normal file.” exception even though the file appears (in the file manager and text editor) to be entirely healthy. So, I’m trying to recreate this error and see how I can deal with it but to do that I need to manually create a file that would raise this exception, and I have no clue what I could manually do to a file to have it suddenly become “broken” in this way.

I realize that whatever I will do to the file is not the same thing that is wrong with the files that are throwing my exception, but for the purpose of writing testable code to verify that my safeguarding code works, that won’t matter… I just need a broken file. I guess I could just throw the exception manually in some random cycle, but I was hoping I could get this to be more “realistic”.

All help appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T07:24:22+00:00Added an answer on June 11, 2026 at 7:24 am

    If you want to corrupt an existing file just write a function that opens the file and scrambles the bytes. You can also do this with a hex editor. If you want to generate garbage files you can just create a new file and write a random.nextBytes() in to it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a process/Linux, which runs out of memory very soon, and I wonder
I have a C++ process which has a thread that needs to send floats
I have an application which needs to find and then process files which follow
I have a process that's going to initially generate 3-4 million PDF files, and
I have some very big delimited data files and I want to process only
I have a win32 project which is very complex and i successfully referenced that
I have two pieces of code which are very similar in that they register
I have a process which has a notify method which receives as a parameter
I have a process which gives me continuously output in Screen. I want to
I have a process which iterates through a bunch of ActiveRecord models, does some

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.