Can anyone please tell me how to convert com.aspose.slides.Presentation object to InputStream object??
Thanks in advance…
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
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.
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());
Thanks for sharing the code example.