MMS content type | Search |
NowSMS Support Forums ⬆ MMS & SMS Technical Discussions (unsupported) ⬆ Archive through October 05, 2005 ⬆ |
◄ ► |
Author | Message | |||
Anonymous |
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 |
Have a look at: WAPWSP - WAP-230-WSP Which can be found at oma.org |