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 7995917
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T14:33:46+00:00 2026-06-04T14:33:46+00:00

In my project we are saving some files. When a file is requested, I

  • 0

In my project we are saving some files.
When a file is requested, I fetch the file from the HBase table and then send it to the browser.

Data is saved in Bytes in HBase. So when I fetch the file I am getting it in Bytes.

Now I have to convert these Bytes into either File object or in Output Stream.

What I want to know is whether send the file via a File object is better or Output Stream?

The file can vary from 1 MB to 10 MS’s.

I am using REST API to send data.

  • 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-04T14:33:48+00:00Added an answer on June 4, 2026 at 2:33 pm

    Sending a java.io.File object wont help as it would be a very java specific binary object and it will mandate that receiving system is in java.

    You mentioned, you are using REST. Now this calls for something which is independent of any technology/platform.

    One feasible approach would be as follows.

    1. Let the rest API return a URL which points to the file user wish to download.
    2. Write/Configure a Servlet for this URL.
    3. When this servlet receives the request, it reads the database and writes to the response stream (output stream).
    4. The user will get a prompt asking for file download.

    Here is an example of PDF file download using a servlet .

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

Sidebar

Related Questions

I've got a project where I'm reading data from an Excel worksheet and saving
I am working on a project in which I am saving data in a
I'm working on a project which is saving some images to sdcard and now
I'm having some trouble using resource files. In my project I'm using a bunch
For some reason on my current project I create my resource file via the
My android app project need to add a new function of saving the click
It seems like management always is saying how the project is late, then we
according to Apache AVRO project, Avro is a serialization system. By saying data serialization
Requirements Project should contain 1 main application and some secondary sub applications (which uses
I just created a new Xcode project. In the AppControl class Header file I

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.