本文整理汇总了Java中org.apache.thrift.TBaseHelper.byteBufferToByteArray方法的典型用法代码示例。如果您正苦于以下问题:Java TBaseHelper.byteBufferToByteArray方法的具体用法?Java TBaseHelper.byteBufferToByteArray怎么用?Java TBaseHelper.byteBufferToByteArray使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.thrift.TBaseHelper
的用法示例。
在下文中一共展示了TBaseHelper.byteBufferToByteArray方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: columnNameAsByteArray
import org.apache.thrift.TBaseHelper; //导入方法依赖的package包/类
/**
* Converts column name into byte[] according to comparator type
* @param column - column name from parser
* @param columnFamily - column family name from parser
* @return bytes[] - into which column name was converted according to comparator type
*/
private byte[] columnNameAsByteArray(String column, String columnFamily)
{
return TBaseHelper.byteBufferToByteArray(columnNameAsBytes(column, columnFamily));
}
示例2: subColumnNameAsByteArray
import org.apache.thrift.TBaseHelper; //导入方法依赖的package包/类
/**
* Converts sub-column name into byte[] according to comparator type
* @param superColumn - sub-column name from parser
* @param cfDef - column family from parser
* @return bytes[] - into which column name was converted according to comparator type
*/
private byte[] subColumnNameAsByteArray(String superColumn, CfDef cfDef)
{
return TBaseHelper.byteBufferToByteArray(subColumnNameAsBytes(superColumn, cfDef));
}