06-06-2007, 10:03 AM
Knows Where the Search Button Is
Join Date: Apr 2007
Post Thanks: 0
Thanked 0 Times in 0 Posts
| | get to rest of message from transport.more
Please Login to Remove!
Hoping somebody can make sense of something for me. I've 'inherited' a bberry app and I've managed some significant progress with it, but not being a Java developer I think I'm missing some of the "Java 1.0.1" essentials...
Essentially, I have a Message object from which I've subtracted a BodyPart. I have checked to see if the BodyPart hasMore and it has. I have issued Transport.More to get more, and it does. I can not now for the life of me get to the rest of the content.
This is what I have (embarrasing...) :
BodyPart msgbp = (BodyPart)msg.getContent();
System.out.println("Msg has more - fetching...");
net.rim.blackberry.api.mail.Transport.more((BodyPa rt)msgbp, true);
System.out.println("Updating body text container...");
mail = (String)msgbp.getContent() ;
System.out.println("Mail body now : "+mail);
msg is a message resulting from folder.getMessages, msg is specifically msgs[i] and this is in a loop.
mail is a string created earlier and is msg.getBodyText(). I use this string to see if the message is one my app is 'interested in'... basically the mail variable is the same before I get more and after so I don't know how to refresh the object, I've tried a number of things...
Thanks in advance for any assistance...