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  
Closed Thread


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Audiometer Bone Conduction Transducer B-71 by RADIOEAR
$124.99
Audiometer Bone Conduction Transducer B-71 by RADIOEAR pictureMATHESON TRANSDUCER MODEL 8141 500 SCCM AIR (Q4)
$75.0
MATHESON TRANSDUCER MODEL 8141 500 SCCM AIR (Q4) pictureSITE-RITE VISION 9770033 LINEAR 128 WB ULTRASOUND TRANSDUCER (161827)
$359.99
SITE-RITE VISION 9770033 LINEAR 128 WB ULTRASOUND TRANSDUCER  (161827) pictureLEM DHR-300-C10 AC/DC CURRENT TRANSDUCER INPUT 300A, OUTPUT 0-10V, VCC 20-50VDC
$151.85
LEM DHR-300-C10 AC/DC CURRENT TRANSDUCER INPUT 300A, OUTPUT 0-10V, VCC 20-50VDC picturePHILIPS L12-5 LINEAR ARRAY ULTRASOUND TRANSDUCER (162576)
$399.99
PHILIPS L12-5 LINEAR ARRAY ULTRASOUND TRANSDUCER  (162576) picture






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