本文整理汇总了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();
}
示例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()));
}
示例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;
}