Re: [Beepcore-java-users] sending files in messages
Status: Beta
Brought to you by:
huston
|
From: William J. M. <wm...@ol...> - 2002-05-28 17:50:37
|
Gabe,
Can't you set the mime type when you create the datastream? I
thought you could.
-bill
On Sun, May 26, 2002 at 05:56:41PM -0700, Gabe Wachob wrote:
> 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
>
>
> _______________________________________________________________
>
> Don't miss the 2002 Sprint PCS Application Developer's Conference
> August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm
>
> _______________________________________________
> Beepcore-java-users mailing list
> Bee...@li...
> https://lists.sourceforge.net/lists/listinfo/beepcore-java-users
|