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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T12:58:08+00:00 2026-06-02T12:58:08+00:00

the client supposed to to upload a .ppt file , and the server supposed

  • 0

the client supposed to to upload a .ppt file , and the server supposed to save it and display it.

I did stored the (request.getContent() )in a DatainputStream object.

    DataInputStream pptFile = new DataInputStream(request.getInputStream());

But I cannot assign this type of variables ( DataInputStream) into an object from the library (org.apache.poi.hslf.usermodel.SlideShow).

 DataInputStream pptFile = new DataInputStream(request.getInputStream());
 SlideShow ppt = new SlideShow ( pptFile );

I need to use the pptFile as a FileInputStream variable, I know that I can convert from FileInputStream to DataInputStream easily, but How can I do the opposite? (Converting from DataInputStream to FileInputStream)

OR
At least Can I store the (request.getContent) inside a FileInputStream ??

  • 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-02T12:58:11+00:00Added an answer on June 2, 2026 at 12:58 pm

    DataInputStream is not an appropriate class for your requirements (read its Javadoc more carefully).

    You can store the request in a ByteArrayInputStream and then provide that to the SlideShow object. This might use up a lot of memory (PPT files can get many megabytes in size), but get that working first. Then, investigate using a temporary file to save the upload instead of keeping it in memory.

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

Sidebar

Related Questions

Objective: Suppose the client submits a string or text file to the server (Google
The intranet website is supposed to create a word document client-side from templates server-side
Im building a simple chat client which is only supposed to be able to
suppose a client starts a selenium session on an RC server, but at the
So I'm writing a program that is suppose to run forever (client server stuff)
I've developed a small app for my client which is supposed to be released
I have a receive callback from an async client method that is supposed to
I have a web service client using axis. It's using document/literal style and supposed
I've integrated JQuery File Upload into a Java Spring application. The returned JSON is
Is the client supposed to behave differently? How?

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.