本文整理了Java中org.apache.cassandra.utils.Hex.bytesToHex()
方法的一些代码示例,展示了Hex.bytesToHex()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Hex.bytesToHex()
方法的具体详情如下:
包路径:org.apache.cassandra.utils.Hex
类名称:Hex
方法名:bytesToHex
暂无
代码示例来源:origin: palantir/atlasdb
@Override
public String toString(Token token)
{
AtlasBytesToken bytesToken = (AtlasBytesToken) token;
return Hex.bytesToHex((byte[]) bytesToken.getTokenValue());
}
代码示例来源:origin: org.apache.cassandra/cassandra-all
public static String toString(byte[] hash)
{
if (hash == null)
return "null";
return "[" + Hex.bytesToHex(hash) + "]";
}
代码示例来源:origin: com.facebook.presto.cassandra/cassandra-server
@Override
public String toString()
{
return Hex.bytesToHex(token);
}
代码示例来源:origin: com.netflix.sstableadaptor/sstable-adaptor-cassandra
public static String toString(byte[] hash)
{
if (hash == null)
return "null";
return "[" + Hex.bytesToHex(hash) + "]";
}
代码示例来源:origin: com.strapdata.cassandra/cassandra-all
public static String toString(byte[] hash)
{
if (hash == null)
return "null";
return "[" + Hex.bytesToHex(hash) + "]";
}
代码示例来源:origin: jsevellec/cassandra-unit
public static String bytesToHex(byte... bytes)
{
return bytesToHex(bytes, 0, bytes.length);
}
代码示例来源:origin: jsevellec/cassandra-unit
public String toString(Token token)
{
BytesToken bytesToken = (BytesToken) token;
return Hex.bytesToHex(bytesToken.token);
}
代码示例来源:origin: org.apache.cassandra/cassandra-all
@Override
public String toString()
{
return Hex.bytesToHex(bytes);
}
}
代码示例来源:origin: org.apache.cassandra/cassandra-all
@Override
public String toString()
{
return Hex.bytesToHex(token);
}
代码示例来源:origin: org.apache.cassandra/cassandra-all
public String toString(Token token)
{
BytesToken bytesToken = (BytesToken) token;
return Hex.bytesToHex(bytesToken.token);
}
代码示例来源:origin: jsevellec/cassandra-unit
@Override
public String toString()
{
return Hex.bytesToHex(bytes);
}
}
代码示例来源:origin: jsevellec/cassandra-unit
public static String toString(byte[] hash)
{
if (hash == null)
return "null";
return "[" + Hex.bytesToHex(hash) + "]";
}
代码示例来源:origin: jsevellec/cassandra-unit
@Override
public String toString()
{
return Hex.bytesToHex(token);
}
代码示例来源:origin: com.facebook.presto.cassandra/cassandra-server
public String toString(Token token)
{
BytesToken bytesToken = (BytesToken) token;
return Hex.bytesToHex(bytesToken.token);
}
代码示例来源:origin: com.netflix.sstableadaptor/sstable-adaptor-cassandra
@Override
public String toString()
{
return Hex.bytesToHex(bytes);
}
}
代码示例来源:origin: jsevellec/cassandra-unit
public Map<String, String> toHeaderParameters()
{
Map<String, String> map = new HashMap<>(3);
// add compression options, someday ...
if (tdeOptions.enabled)
{
map.put(ENCRYPTION_CIPHER, tdeOptions.cipher);
map.put(ENCRYPTION_KEY_ALIAS, tdeOptions.key_alias);
if (iv != null && iv.length > 0)
map.put(ENCRYPTION_IV, Hex.bytesToHex(iv));
}
return map;
}
代码示例来源:origin: Stratio/cassandra-lucene-index
private String base(String value) {
try {
byte[] bytes = Hex.hexToBytes(value.replaceFirst("0x", ""));
return Hex.bytesToHex(bytes);
} catch (NumberFormatException e) {
throw new IndexException(e, "Field '{}' requires an hex string, but found '{}'", field, value);
}
}
}
代码示例来源:origin: jsevellec/cassandra-unit
protected Map<String, String> additionalHeaderParameters()
{
Map<String, String> map = encryptionContext.toHeaderParameters();
map.put(EncryptionContext.ENCRYPTION_IV, Hex.bytesToHex(cipher.getIV()));
return map;
}
代码示例来源:origin: org.apache.cassandra/cassandra-all
protected Map<String, String> additionalHeaderParameters()
{
Map<String, String> map = encryptionContext.toHeaderParameters();
map.put(EncryptionContext.ENCRYPTION_IV, Hex.bytesToHex(cipher.getIV()));
return map;
}
代码示例来源:origin: jsevellec/cassandra-unit
private static String thriftToString(TBase object)
{
assert object != null;
// this is so awful it's kind of cool!
TSerializer serializer = new TSerializer(new TBinaryProtocol.Factory());
try
{
return Hex.bytesToHex(serializer.serialize(object));
}
catch (TException e)
{
throw new RuntimeException(e);
}
}
内容来源于网络,如有侵权,请联系作者删除!