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

  • Home
  • SEARCH
  • 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 6849163
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T00:57:22+00:00 2026-05-27T00:57:22+00:00

After painstakingly trying to implement TCP file transfer in my conference chat application using

  • 0

After painstakingly trying to implement TCP file transfer in my conference chat application using raw byte streams, I’ve decided it’s much easier to send files that I want transferred through object streams. The files are sent and stored at their destination (whether that is the central server or the downloading client) as in-memory File objects. However, these files are no use as just File objects – clients should be able to open them. Is there a way in java to save File objects as hard-disk files or to even open them up through Java?

  • 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-05-27T00:57:23+00:00Added an answer on May 27, 2026 at 12:57 am

    What do you mean with “File objects”; do you mean java.io.File?

    Class java.io.File is just a representation of a directory name and filename. It is not an object which can hold the contents of a file.

    If you have the data in for example a byte array in memory, then yes, you can save that to a file:

    byte[] data = ...;
    
    OutputStream out = new FileOutputStream(new File("C:\\someplace\\filename.dat"));
    out.write(data);
    out.close();
    

    See the Basic I/O Lesson from Oracle’s Java Tutorials to learn how to read and write files with a FileInputStream and FileOutputStream.

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

Sidebar

Related Questions

After years of using the big ugly MFC ASSERT macro, I have finally decided
After reading the Head First Design Patterns book and using a number of other
After doing an AJAX call, am redirecting- using the following code. But, after AJAX
after using sciviews-K for a while, I am about to give the R Eclipse
After using the following code no errors are shown, but my database is not
After nearly 10 hours of searching and trying different things I couldn't figure out,
After reading lots of sample code into this matter, I'm trying to figure out
After debugging a CodeIgniter application that were installed into a new development environment, I
After reading up on the JQGrid control, I decided it would be good to
After developing mini project with WCF duplex (Chat Service | Sms Service), I got

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.