OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

XInputStream derived from XComponent

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API
View previous topic :: View next topic  
Author Message
Freddieric
General User
General User


Joined: 08 Dec 2004
Posts: 19

PostPosted: Wed Dec 15, 2004 12:10 am    Post subject: XInputStream derived from XComponent Reply with quote

Is there a way to derive an XInputStream or InputStream in the service XComponent?
Back to top
View user's profile Send private message
DannyB
Moderator
Moderator


Joined: 02 Apr 2003
Posts: 3991
Location: Lawrence, Kansas, USA

PostPosted: Wed Dec 15, 2004 8:41 am    Post subject: Reply with quote

It is not clear what you are asking.

Clearly, XInputStream inherits from XInterface.

It would be possible to implement your own service, which implements both interfaces XInputStream and XComponent, and other interfaces. Why you would want to do so, or whether building a custom service is what you want to do is unclear.
_________________
Want to make OOo Drawings like the colored flower design to the left?
Back to top
View user's profile Send private message
Cybb20
Super User
Super User


Joined: 02 Mar 2004
Posts: 1569
Location: Frankfurt, Germany

PostPosted: Wed Dec 15, 2004 12:40 pm    Post subject: Reply with quote

Please be more specific, XInputStream and InputStream are two different things (one is a service and one is an interface).
Also please do provide the reason or at least what the goal is youre trying to achieve.

Christian
_________________
- Knowledge is Power -
Back to top
View user's profile Send private message Send e-mail
Freddieric
General User
General User


Joined: 08 Dec 2004
Posts: 19

PostPosted: Wed Dec 15, 2004 5:19 pm    Post subject: Reply with quote

Ok, sorry for that.

On my program, i already have XComponent object. This object holds the whole document right? On that object, is there any way i can transform it into XInputStream, or any stream?

My goal is, to get an inputstream for me to directly put it on the Servlet response output stream. What i am doing is, reading the template document (.sxw), then populate data to the template via servlet, save it to temporary file. Then through that temporary file, i can load it in servlet. Because it is easy to get the inputstream. What i want is to not save it to temporary file, instead, transform the template document with the populated data into a stream and directly display that in the browser. So i am asking if there is a way that the XComponent, because i dont see any method to get its input stream, be tranformed into inputstream.

Hope this is clear.

Thanks!
Back to top
View user's profile Send private message
DannyB
Moderator
Moderator


Joined: 02 Apr 2003
Posts: 3991
Location: Lawrence, Kansas, USA

PostPosted: Thu Dec 16, 2004 8:19 am    Post subject: Reply with quote

This very question was asked some weeks back. See this.....
http://www.oooforum.org/forum/viewtopic.php?p=55665#55665

I also recall seeing somewhere recently, a Java class that implemented XOutputStream, and saved the result in memory to a large array of byte. Then a Java stream could be connected to the array of bytes, and to the http response. This approach is almost like saving to a temporary file first, but in memory. I don't remember if I saw this on OOoForum or on the API mailing list.


See also....

Load a document from an XInputStream using private:stream
Load a document from database blob
http://www.oooforum.org/forum/viewtopic.php?t=6807
http://www.oooforum.org/forum/viewtopic.php?t=7032
http://www.oooforum.org/forum/viewtopic.php?t=7010
store to blob, technique but no working example
http://www.oooforum.org/forum/viewtopic.php?t=7011
Working example, store a document to private:stream
http://www.oooforum.org/forum/viewtopic.php?p=55665#55665
_________________
Want to make OOo Drawings like the colored flower design to the left?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group