当前位置: 首页>>代码示例>>Java>>正文


Java Codec类代码示例

本文整理汇总了Java中com.github.theholywaffle.teamspeak3.api.Codec的典型用法代码示例。如果您正苦于以下问题:Java Codec类的具体用法?Java Codec怎么用?Java Codec使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


Codec类属于com.github.theholywaffle.teamspeak3.api包,在下文中一共展示了Codec类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: ChannelData

import com.github.theholywaffle.teamspeak3.api.Codec; //导入依赖的package包/类
public ChannelData(String name, int owner, String password, String description, String filePath, String topic, int maxClients,
                   long iconID, int codecQuality, Codec codec, int talkPower) {
    this.name = name;
    this.owner = owner;
    settings.put("password", password);
    settings.put("description", description);
    settings.put("filePath", filePath);
    settings.put("topic", topic);
    settings.put("maxClients", maxClients);
    settings.put("iconID", iconID);
    settings.put("codecQuality", codecQuality);
    settings.put("codec", codec.toString());
    settings.put("talkPower", talkPower);
    data.add(this);
    save();
}
 
开发者ID:phenomax,项目名称:TeamspeakPTC,代码行数:17,代码来源:ChannelData.java

示例2: deserialize

import com.github.theholywaffle.teamspeak3.api.Codec; //导入依赖的package包/类
/**
 * Deserializes the input to ChannelData
 *
 * @param input the serialized ChannelData
 * @return a new ChannelData object
 */
public static ChannelData deserialize(String input) {
    JSONObject jsonObject = gson.fromJson(input, JSONObject.class);

    HashMap<String, Object> settings = (HashMap<String, Object>) jsonObject.get("settings");
    return new ChannelData(jsonObject.get("name").toString(),
            Integer.valueOf(jsonObject.get("owner").toString()),
            settings.get("password").toString(),
            settings.get("description").toString(),
            settings.get("filePath").toString(),
            settings.get("topic").toString(),
            Integer.valueOf(settings.get("maxClients").toString()),
            Long.valueOf(settings.get("iconID").toString()),
            Integer.valueOf(settings.get("codecQuality").toString()),
            Codec.valueOf(settings.get("codec").toString()),
            Integer.valueOf(settings.get("talkPower").toString()));
}
 
开发者ID:phenomax,项目名称:TeamspeakPTC,代码行数:23,代码来源:ChannelData.java

示例3: getCodec

import com.github.theholywaffle.teamspeak3.api.Codec; //导入依赖的package包/类
public Codec getCodec() {
	final int codec = getInt(ChannelProperty.CHANNEL_CODEC);
	for (final Codec c : Codec.values()) {
		if (c.getIndex() == codec) {
			return c;
		}
	}
	return Codec.UNKNOWN;
}
 
开发者ID:DiscowZombie,项目名称:UltimateTs,代码行数:10,代码来源:ChannelBase.java


注:本文中的com.github.theholywaffle.teamspeak3.api.Codec类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。