[Beepcore-java-users] sending files in messages
Status: Beta
Brought to you by:
huston
|
From: Gabe W. <gw...@wa...> - 2002-05-27 00:56:49
|
I am trying to send a file in a message using beepcore-java .. I'd like to
do a typical read loop - read from the file, send it "through" the message
outputdatastream, read from the file, send through the message datastream,
etc.
I can use OutputDataStream and create BufferSegments each time I read from
the file. Fine. But OutputDataStream doesn't let me set the MimeHeaders
without subclassing.. (the constructor is protectedEGAD!! Why is this? I
really don't want to have to subclass just to set the mime headers.
Can we just make the constructor for OutputDataStream not protected?
I'm writing demo code and I'm trying to make things as simple as possible.
Another thing I'd like to see is a helper class perhaps that would take a
file or file inputstream and wrap it in a OutputDataStream interface.
i.e.:
new Message(new FileOutputDataStream(new FileInputStream("foo.txt")));
This is relativley high priority for me - I'm working on a book chapter
about beep and it is going to use the beepcore-java libs.. if we could
un-hide the constructor I mentioned above, that'd be the quick-n-easy
solution.
THANKS!!!
-Gabe
--
Gabe Wachob gw...@wa...
Personal http://www.wachob.com
Founder, WiredObjects http://www.wiredobjects.com
|