本文整理汇总了Java中org.red5.io.object.UnsignedInt类的典型用法代码示例。如果您正苦于以下问题:Java UnsignedInt类的具体用法?Java UnsignedInt怎么用?Java UnsignedInt使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
UnsignedInt类属于org.red5.io.object包,在下文中一共展示了UnsignedInt类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: writeVectorUInt
import org.red5.io.object.UnsignedInt; //导入依赖的package包/类
/**
* Write a Vector<uint>.
*
* @param vector vector
*/
@Override
public void writeVectorUInt(Vector<Long> vector) {
log.debug("writeVectorUInt: {}", vector);
writeAMF3();
buf.put(AMF3.TYPE_VECTOR_UINT);
if (hasReference(vector)) {
putInteger(getReferenceId(vector) << 1);
return;
}
storeReference(vector);
putInteger(vector.size() << 1 | 1);
buf.put((byte) 0x00);
for (Long v : vector) {
// update this class to implement valueOf like Long.valueOf
UnsignedInt uint = new UnsignedInt(v);
byte[] arr = uint.getBytes();
buf.put(arr);
}
}
示例2: writeVectorUInt
import org.red5.io.object.UnsignedInt; //导入依赖的package包/类
/**
* Write a Vector<uint>.
*
* @param vector
* vector
*/
@Override
public void writeVectorUInt(Vector<Long> vector) {
log.debug("writeVectorUInt: {}", vector);
writeAMF3();
buf.put(AMF3.TYPE_VECTOR_UINT);
if (hasReference(vector)) {
putInteger(getReferenceId(vector) << 1);
return;
}
storeReference(vector);
putInteger(vector.size() << 1 | 1);
buf.put((byte) 0x00);
for (Long v : vector) {
// update this class to implement valueOf like Long.valueOf
UnsignedInt uint = new UnsignedInt(v);
byte[] arr = uint.getBytes();
buf.put(arr);
}
}
示例3: writeVectorUInt
import org.red5.io.object.UnsignedInt; //导入依赖的package包/类
/**
* Write a Vector<uint>.
*
* @param vector
*/
@Override
public void writeVectorUInt(Vector<Long> vector) {
log.debug("writeVectorUInt: {}", vector);
writeAMF3();
buf.put(AMF3.TYPE_VECTOR_UINT);
if (hasReference(vector)) {
putInteger(getReferenceId(vector) << 1);
return;
}
storeReference(vector);
putInteger(vector.size() << 1 | 1);
buf.put((byte) 0x00);
for (Long v : vector) {
// update this class to implement valueOf like Long.valueOf
UnsignedInt uint = new UnsignedInt(v);
byte[] arr = uint.getBytes();
buf.put(arr);
}
}