BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 11-12-2007, 12:57 PM   #1 (permalink)
Thumbs Must Hurt
 
Join Date: Jul 2006
Location: Moscow
Model: 9000
OS: 4.6.0.304
Carrier: MTC
Posts: 72
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default How I can get more 32000 byte from attachment file?

Please Login to Remove!

I find much information about how I can get content of message, but I have got problem with get more of 32000 byte from attachment file.



I can see real size of file (_trueLength on picture), but I canít get full content of this file, only first 32000 byte (see _dataEncoding array size).

I know system tools send retrieve request on server if size of attachment more of 32000 byte, but How I can implement this ability from my code?

Any ideas?

Code:
BodyPart part = multi.getBodyPart(i);
byte[] partConten = (byte[]) part.getContent();
After launch this code partContent has size 32000 byte.
Attached Files
File Type: zip get_more_32000_byte20071112194804.zip (52.3 KB, 1 views)
Offline  
Old 11-13-2007, 03:45 AM   #2 (permalink)
CrackBerry Addict
 
Join Date: Apr 2005
Location: hamburg, germany
Model: 8900
Carrier: o2
Posts: 838
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Code:
if (part.hasMore()) {
if (!part.moreRequestSent()) {
m.addMessageListener(this);						
Transport.more(part, true);
}
}
with m being your message and your class implementing messagelistener to call itself upon changes of the message, for example when a new part has been fetched.

hth,
simon
__________________
java developer, Devinto, hamburg/germany
Offline  
Old 11-13-2007, 08:36 AM   #3 (permalink)
Thumbs Must Hurt
 
Join Date: Jul 2006
Location: Moscow
Model: 9000
OS: 4.6.0.304
Carrier: MTC
Posts: 72
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for reply, but

on screen you can see

_morePartID = 0

hasMore check this field and if _morePartID>0 return true

Your suggestion implemented, but I don't get next parts of message still.
Offline  
Old 11-13-2007, 11:35 AM   #4 (permalink)
Thumbs Must Hurt
 
Join Date: Jul 2006
Location: Moscow
Model: 9000
OS: 4.6.0.304
Carrier: MTC
Posts: 72
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

If I'm using ESS I can get correct full file,

see picture

Offline  




Copyright © 2004-2016 BlackBerryForums.com.
The names RIM © and BlackBerry © are registered Trademarks of BlackBerry Inc.