本文整理了Java中org.apache.kylin.common.util.Bytes.toShort()
方法的一些代码示例,展示了Bytes.toShort()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Bytes.toShort()
方法的具体详情如下:
包路径:org.apache.kylin.common.util.Bytes
类名称:Bytes
方法名:toShort
[英]Converts a byte array to a short value
[中]将字节数组转换为短值
代码示例来源:origin: apache/kylin
/**
* Converts a byte array to a short value
*
* @param bytes byte array
* @return the short value
*/
public static short toShort(byte[] bytes) {
return toShort(bytes, 0, SIZEOF_SHORT);
}
代码示例来源:origin: apache/kylin
/**
* Converts a byte array to a short value
*
* @param bytes byte array
* @param offset offset into array
* @return the short value
*/
public static short toShort(byte[] bytes, int offset) {
return toShort(bytes, offset, SIZEOF_SHORT);
}
代码示例来源:origin: apache/kylin
offset += RowConstants.ROWKEY_SHARDID_LEN;
shardId = Bytes.toShort(shardSplit.array(), shardSplit.offset());
代码示例来源:origin: apache/kylin
byte[] sellerId = Arrays.copyOfRange(encodedKey, rowKeyEncoder.getHeaderLength(), 18 + rowKeyEncoder.getHeaderLength());
byte[] rest = Arrays.copyOfRange(encodedKey, 4 + rowKeyEncoder.getHeaderLength(), encodedKey.length);
assertEquals(0, Bytes.toShort(shard));
代码示例来源:origin: apache/kylin
byte[] cuboidId = Arrays.copyOfRange(encodedKey, RowConstants.ROWKEY_SHARDID_LEN, rowKeyEncoder.getHeaderLength());
byte[] rest = Arrays.copyOfRange(encodedKey, 4 + rowKeyEncoder.getHeaderLength(), encodedKey.length);
assertEquals(0, Bytes.toShort(shard));
代码示例来源:origin: org.apache.kylin/kylin-common
/**
* Converts a byte array to a short value
*
* @param bytes byte array
* @param offset offset into array
* @return the short value
*/
public static short toShort(byte[] bytes, int offset) {
return toShort(bytes, offset, SIZEOF_SHORT);
}
代码示例来源:origin: org.apache.kylin/kylin-core-common
/**
* Converts a byte array to a short value
*
* @param bytes byte array
* @return the short value
*/
public static short toShort(byte[] bytes) {
return toShort(bytes, 0, SIZEOF_SHORT);
}
代码示例来源:origin: org.apache.kylin/kylin-core-common
/**
* Converts a byte array to a short value
*
* @param bytes byte array
* @param offset offset into array
* @return the short value
*/
public static short toShort(byte[] bytes, int offset) {
return toShort(bytes, offset, SIZEOF_SHORT);
}
代码示例来源:origin: org.apache.kylin/kylin-common
/**
* Converts a byte array to a short value
*
* @param bytes byte array
* @return the short value
*/
public static short toShort(byte[] bytes) {
return toShort(bytes, 0, SIZEOF_SHORT);
}
代码示例来源:origin: org.apache.kylin/kylin-core-cube
offset += RowConstants.ROWKEY_SHARDID_LEN;
shardId = Bytes.toShort(shardSplit.array(), shardSplit.offset());
内容来源于网络,如有侵权,请联系作者删除!