MMS content type

MMS content type SearchSearch
Author Message
Anonymous
 
Posted on Tuesday, February 15, 2005 - 05:02 am:   

I am not able to decode the header CONTENT-TYPE from the mms message. Can you suggest me some docs to refer or tell me the way how to decode the content-type.From the mms library I got the code as follows from the nokia java library. Can you say me why they are checking with the hex value 0x80.?


// ------------------------------------------------------- MMS Header Encoding

private String readContentTypeValue() {
int bv=unsignedByte(m_In[m_i]);
String value="";

if (bv>=0x80) { /* Constrained-media - Short Integer*/
// Short-integer: the assigned number of the well-known encoding is
// small enough to fit into Short-integer
value=readWellKnownMedia();
}
else /* Constrained-media - Extension-media*/
if (bv >= 0x20 && bv < 0x80) {
value = readTextString();
}
else /* Content-general-form */
if (bv < 0x20) {
int valueLength = readValueLength();
bv=unsignedByte(m_In[m_i]);
if (bv>=0x80) { //Well-known-media
int i2=m_i;
value=readWellKnownMedia();
if (value.equals("application/vnd.wap.multipart.related")) {
bv=decodeByte(m_In[m_i]);
if (bv==WKPA_TYPE) { // Type of the multipart/related
m_i++;
m_Message.setMultipartRelatedType( readTextString() );
bv=decodeByte(m_In[m_i]);
if (bv==WKPA_START) { // Start (it is the pointer to the presentetion part)
m_i++;
m_Message.setPresentationId( readTextString() );
}
}
}

m_i=i2+valueLength;
} else {
int i2=m_i;
value=readTextString();
m_i=i2+valueLength;
}
}
return(value);
}
Anonymous
 
Posted on Tuesday, March 15, 2005 - 10:10 am:   

Have a look at:
WAPWSP - WAP-230-WSP
Which can be found at oma.org