Sign In  Sign Up Live-Chat

To convert com.aspose.slides.Presentation object to inputStream

Last post 09-07-2008, 4:46 PM by msfaiz. 3 replies.
Sort Posts: Previous Next
  •  09-04-2008, 6:07 AM 142352

    To convert com.aspose.slides.Presentation object to inputStream

    Hi..

    Can anyone please tell me how to convert com.aspose.slides.Presentation object to InputStream object??

    Thanks in advance..

     
  •  09-04-2008, 3:06 PM 142477 in reply to 142352

    Re: To convert com.aspose.slides.Presentation object to inputStream

    Dear Tapan,

     

    Thanks for considering Aspose.Slides.

     

    InputSteam and OuputStream are two abstract classes, means you cannot create their instances.

     

    However, some classes have been derived from them and are concrete classes means you can create their instances.

     

    For example, FileInputStream is one of concrete classes that have been derived from InputStream class.

     

    And similarly, FileOutputStream is one of concrete classes that have been derived from OutputStream class.

     

    Now, you can create a Presentation object from InputStream derived classes and also write Presentation object to OutputStream derived classes.

     

    Please see these links.

    http://www.aspose.com/documentation/file-format-components/aspose.slides-for-.net-and-java/opening-a-presentation.html

    http://www.aspose.com/documentation/file-format-components/aspose.slides-for-.net-and-java/saving-a-presentation.html

     


    Many Thanks and Kind Regards,

    Shakeel Faiz
    Support Engineer
    Aspose Tyumen Team
     
  •  09-05-2008, 1:59 AM 142541 in reply to 142477

    Re: To convert com.aspose.slides.Presentation object to inputStream

    Hey..

    Thanks for the Reply.
    This is what i have done to convert the Presentation  object to inputstream object. I have used ByteArrayOutputStream class to do so.
    This is my code:
    ByteArrayOutputStream outStr= new ByteArrayOutputStream();
                newPresentation.write(outStr);

                ByteArrayInputStream pptInputStream = new ByteArrayInputStream(outStr.toByteArray());
               
                return pptInputStream;

               
    Thanks again..
     
  •  09-07-2008, 4:46 PM 142782 in reply to 142541

    Re: To convert com.aspose.slides.Presentation object to inputStream

    Thanks for sharing the code example.
    Many Thanks and Kind Regards,

    Shakeel Faiz
    Support Engineer
    Aspose Tyumen Team
     
View as RSS news feed in XML