本文整理汇总了Java中org.opencloudb.mysql.BufferUtil.getLength方法的典型用法代码示例。如果您正苦于以下问题:Java BufferUtil.getLength方法的具体用法?Java BufferUtil.getLength怎么用?Java BufferUtil.getLength使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.opencloudb.mysql.BufferUtil
的用法示例。
在下文中一共展示了BufferUtil.getLength方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: calcPacketSize
import org.opencloudb.mysql.BufferUtil; //导入方法依赖的package包/类
@Override
public int calcPacketSize() {
int size = BufferUtil.getLength(fieldCount);
if (extra > 0) {
size += BufferUtil.getLength(extra);
}
return size;
}
示例2: calcPacketSize
import org.opencloudb.mysql.BufferUtil; //导入方法依赖的package包/类
@Override
public int calcPacketSize() {
int i = 1;
i += BufferUtil.getLength(affectedRows);
i += BufferUtil.getLength(insertId);
i += 4;
if (message != null) {
i += BufferUtil.getLength(message);
}
return i;
}
示例3: calcPacketSize
import org.opencloudb.mysql.BufferUtil; //导入方法依赖的package包/类
@Override
public int calcPacketSize() {
int size = 0;
for (int i = 0; i < fieldCount; i++) {
byte[] v = fieldValues.get(i);
size += (v == null || v.length == 0) ? 1 : BufferUtil.getLength(v);
}
return size;
}
示例4: calcPacketSize
import org.opencloudb.mysql.BufferUtil; //导入方法依赖的package包/类
@Override
public int calcPacketSize() {
int size = 32;// 4+4+1+23;
size += (user == null) ? 1 : user.length() + 1;
size += (password == null) ? 1 : BufferUtil.getLength(password);
size += (database == null) ? 1 : database.length() + 1;
return size;
}
示例5: calcPacketSize
import org.opencloudb.mysql.BufferUtil; //导入方法依赖的package包/类
@Override
public int calcPacketSize() {
int size = (catalog == null ? 1 : BufferUtil.getLength(catalog));
size += (db == null ? 1 : BufferUtil.getLength(db));
size += (table == null ? 1 : BufferUtil.getLength(table));
size += (orgTable == null ? 1 : BufferUtil.getLength(orgTable));
size += (name == null ? 1 : BufferUtil.getLength(name));
size += (orgName == null ? 1 : BufferUtil.getLength(orgName));
size += 13;// 1+2+4+1+2+1+2
if (definition != null) {
size += BufferUtil.getLength(definition);
}
return size;
}
示例6: calcPacketSize
import org.opencloudb.mysql.BufferUtil; //导入方法依赖的package包/类
@Override
public int calcPacketSize() {
int i = 1;
i += BufferUtil.getLength(affectedRows);
i += BufferUtil.getLength(insertId);
i += 4;
if (message != null) {
i += BufferUtil.getLength(message);
}
return i;
}
示例7: calcPacketSize
import org.opencloudb.mysql.BufferUtil; //导入方法依赖的package包/类
@Override
public int calcPacketSize() {
int size = (catalog == null ? 1 : BufferUtil.getLength(catalog));
size += (db == null ? 1 : BufferUtil.getLength(db));
size += (table == null ? 1 : BufferUtil.getLength(table));
size += (orgTable == null ? 1 : BufferUtil.getLength(orgTable));
size += (name == null ? 1 : BufferUtil.getLength(name));
size += (orgName == null ? 1 : BufferUtil.getLength(orgName));
size += 13;// 1+2+4+1+2+1+2
if (definition != null) {
size += BufferUtil.getLength(definition);
}
return size;
}
示例8: calcPacketSize
import org.opencloudb.mysql.BufferUtil; //导入方法依赖的package包/类
@Override
public int calcPacketSize() {
return 1 + BufferUtil.getLength(id);
}