本文整理了Java中org.apache.jena.atlas.lib.Bytes.getLong()
方法的一些代码示例,展示了Bytes.getLong()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Bytes.getLong()
方法的具体详情如下:
包路径:org.apache.jena.atlas.lib.Bytes
类名称:Bytes
方法名:getLong
[英]Get a long from a byte array (network order)
[中]从字节数组中获取长字符(网络顺序)
代码示例来源:origin: apache/jena
/** Get a long from a byte array (network order)
* @param b Byte Array
*/
public static final long getLong(byte[]b)
{ return getLong(b, 0) ; }
代码示例来源:origin: org.apache.jena/jena-base
/** Get a long from a byte array (network order)
* @param b Byte Array
*/
public static final long getLong(byte[]b)
{ return getLong(b, 0) ; }
代码示例来源:origin: org.apache.clerezza.ext/org.apache.jena.jena-arq
/** Get a long from a byte array (network order)
* @param b Byte Array
*/
public static final long getLong(byte[]b)
{ return getLong(b, 0) ; }
代码示例来源:origin: apache/jena
public static TxnIdUuid create(byte[] bytes) {
long mostSignificantBits = Bytes.getLong(bytes, 0) ;
long leastSignificantBits = Bytes.getLong(bytes, 8) ;
return new TxnIdUuid(mostSignificantBits, leastSignificantBits) ;
}
代码示例来源:origin: org.apache.jena/jena-dboe-transaction
public static TxnIdUuid create(byte[] bytes) {
long mostSignificantBits = Bytes.getLong(bytes, 0) ;
long leastSignificantBits = Bytes.getLong(bytes, 8) ;
return new TxnIdUuid(mostSignificantBits, leastSignificantBits) ;
}
代码示例来源:origin: apache/jena
public static NodeId get(byte[] b, int idx) {
long value2 = Bytes.getLong(b, idx);
return decode(value2);
}
代码示例来源:origin: apache/jena
public static NodeId create(byte[] b, int idx) {
long value = Bytes.getLong(b, idx) ;
return create(value) ;
}
代码示例来源:origin: apache/jena
public static TxnIdSimple create(byte[] bytes) {
return new TxnIdSimple(Bytes.getLong(bytes)) ;
}
代码示例来源:origin: org.seaborne.rdf-delta/rdf-delta-base
/** Create a {@code Id}, according to byte.
* @see #asBytes
*/
public static Id fromBytes(byte[] bytes) {
if ( bytes.length == 2*Long.BYTES ) {
long mostSig = Bytes.getLong(bytes, 0);
long leastSig = Bytes.getLong(bytes, Long.BYTES);
UUID uuid = new UUID(mostSig, leastSig);
return fromUUID(uuid);
}
String str = new String(bytes, StandardCharsets.UTF_8);
return new Id(str);
}
代码示例来源:origin: org.apache.jena/jena-dboe-transaction
public static TxnIdSimple create(byte[] bytes) {
return new TxnIdSimple(Bytes.getLong(bytes)) ;
}
代码示例来源:origin: apache/jena
public static NodeId getNodeId(Record r, int idx) {
return NodeId.create(Bytes.getLong(r.getKey(), idx));
}
代码示例来源:origin: apache/jena
@Test public void packLong8()
{
byte[] b = new byte[16] ;
Bytes.setLong(0xF1F2F3F4F5F6F7F8L,b,0) ;
Bytes.setLong(0xA1A2A3A4A5A6A7A8L,b,8) ;
long i1 = Bytes.getLong(b,0) ;
long i2 = Bytes.getLong(b,8) ;
assertEquals(0xF1F2F3F4F5F6F7F8L,i1) ;
assertEquals(0xA1A2A3A4A5A6A7A8L,i2) ;
}
代码示例来源:origin: apache/jena
@Test public void packLong7()
{
byte[] b = new byte[8] ;
Bytes.setLong(0xF1F2F3F4F5F6F7F8L,b) ;
long i = Bytes.getLong(b) ;
assertEquals (0xF1F2F3F4F5F6F7F8L,i) ;
}
内容来源于网络,如有侵权,请联系作者删除!