linphone-LinphoneContent.java文件分析
来源:互联网 发布:京东货到付款拒收 知乎 编辑:程序博客网 时间:2024/06/06 07:41
官方说明
/** * LinphoneContent interface describes a SIP message content (body). * It can be used together with the LinphoneInfoMessage, in order to add content attachment to the INFO message. * @author smorlat * */
翻译:Linphonecontent接口描述了一个SIP消息体。他可以和LinphonInfoMessage一起使用,放入INFO消息队列中。
UML类图
LinphoneContentImpl.java
package org.linphone.core;public class LinphoneContentImpl implements LinphoneContent { private String mType, mSubtype, mEncoding, mName; private byte[] mData; private int mExpectedSize; public LinphoneContentImpl(String type, String subtype, byte data[], String encoding){ mType = type; mSubtype = subtype; mData = data; mEncoding = encoding; mName = null; mExpectedSize = 0; } public LinphoneContentImpl(String name, String type, String subtype, byte data[], String encoding, int expectedSize){ mType = type; mSubtype = subtype; mData = data; mEncoding = encoding; mName = name; mExpectedSize = expectedSize; } //Get the type of the content. for example"application" @Override public String getType() { return mType; } // Get the Subtype of the content, for example "html" @Override public String getSubtype() { return mSubtype; } // Get the data as a string @Override public String getDataAsString() { if (mData != null) return new String(mData); return null; } // Get the expected data size @Override public void setExpectedSize(int size) { mExpectedSize = size; } // the same as above @Override public int getExpectedSize() { return mExpectedSize; } // return the size of the data field @Override public int getRealSize() { if (mData != null) return mData.length; return 0; } // Set the content type, for example "application" @Override public void setType(String type) { mType = type; } //set the subtype, for example "text" @Override public void setSubtype(String subtype) { mSubtype = subtype; } @Override public void setStringData(String data) { if (data != null) mData = data.getBytes(); else mData = null; } @Override public void setData(byte data[]){ mData = data; } @Override public String getEncoding() { return mEncoding; } @Override public byte[] getData() { return mData; } @Override public void setEncoding(String encoding) { mEncoding = encoding; } @Override public void setName(String name) { mName = name; } @Override public String getName() { return mName; }}
0 0
- linphone-LinphoneContent.java文件分析
- linphone-LinphoneManager.java文件分析
- linphone-LinphoneCoreFactory.java文件分析
- linphone-LinphoneAddress.java文件分析
- linphone-LpConfig.java文件分析
- linphone-LinponeCore.java文件分析
- linphone-LinphoneInfoMessage.java文件分析
- linphone-PresenceModel.java文件分析
- linphone-PresenceActivity.java文件分析
- linphone-PresenceService.java文件分析
- linphone-PresencePerson.java文件分析
- linphone-PresenceNote.java文件分析
- linphone-Tunnelconfig.java文件分析
- linphone-KeepAliveReceiver.java文件分析
- linphone-BootReceiver.java文件分析
- linphone-NetworkManger.java文件分析
- linphone-LinphonePreferences.java文件分析
- linphone-LinphoneProxyConfig.java文件分析
- Otter-入门篇2(Manager安装配置)
- vijosp1037搭建双塔-较为清晰简单的思路-动态规划01背包-差值dp
- 庆祝一下开博客。
- maven打包dubbo接口之最佳实践
- Linux---ipcs
- linphone-LinphoneContent.java文件分析
- 怎么在service中调用activity中的handler
- Linux服务器下非root用户远程安装matlab 2014b
- activity的生命周期
- Swift根据日期字符串返回日期是星期几
- Redis 集群教程
- HDU5772 String problem
- mongodb导出数据库到文本文件
- Maven实战(九)——打包的技巧