本文整理了Java中org.bson.io.Bits.readLong()
方法的一些代码示例,展示了Bits.readLong()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Bits.readLong()
方法的具体详情如下:
包路径:org.bson.io.Bits
类名称:Bits
方法名:readLong
[英]Reads and returns a single long value from the input stream.
[中]从输入流读取并返回单个长值。
代码示例来源:origin: org.mongodb/mongo-java-driver
/**
* Reads and returns a single long value from the buffer. The equivalent of called {@link #readLong(byte[], int)} with an offset of
* zero.
*
* @param buffer the buffer to read from
* @return the long value
*/
public static long readLong(final byte[] buffer) {
return readLong(buffer, 0);
}
代码示例来源:origin: org.mongodb/mongo-java-driver
/**
* Reads and returns a single long value from the input stream.
*
* @param inputStream the input stream to read from
* @return the long value
* @throws IOException if there's an error reading from the {@code inputStream}
*/
public static long readLong(final InputStream inputStream) throws IOException {
return readLong(inputStream, new byte[8]);
}
代码示例来源:origin: org.mongodb/mongo-java-driver
/**
* Reads and returns a single long value from the input stream.
*
* @param inputStream the input stream to read from
* @param buffer the buffer to write the input stream bytes into
* @return the long value
* @throws IOException if there's an error reading from the {@code inputStream}
*/
public static long readLong(final InputStream inputStream, final byte[] buffer) throws IOException {
readFully(inputStream, buffer, 8);
return readLong(buffer);
}
代码示例来源:origin: org.mongodb/mongo-java-driver
@Override
protected void doWriteBinaryData(final BsonBinary value) {
if (value.getType() == BsonBinarySubType.UUID_LEGACY.getValue()) {
bsonCallback.gotUUID(getName(),
readLong(value.getData(), 0),
readLong(value.getData(), 8));
} else {
bsonCallback.gotBinary(getName(), value.getType(), value.getData());
}
}
代码示例来源:origin: com.sequoiadb/sequoiadb-driver
public static long readLong( InputStream in )
throws IOException {
return readLong( in , new byte[8] );
}
代码示例来源:origin: com.sequoiadb/sequoiadb-driver
public static long readLong( byte[] data ) {
return readLong( data , 0 );
}
代码示例来源:origin: com.sequoiadb/sequoiadb-driver
public static long readLong( InputStream in , byte[] data )
throws IOException {
readFully(in, data, 8);
return readLong(data);
}
代码示例来源:origin: com.sequoiadb/sequoiadb-driver
public long readLong()
throws IOException {
return org.bson.io.Bits.readLong( _inputBuffer , _need(8) );
}
代码示例来源:origin: thiloplanz/jmockmongo
static final long readInt64(ChannelBuffer buffer, byte[] eightBytes) {
buffer.readBytes(eightBytes);
return Bits.readLong(eightBytes);
}
代码示例来源:origin: com.sequoiadb/sequoiadb-driver
throw new IllegalArgumentException("bad data size subtype 3 len: " + totalLen + " != 16");
final long part1 = Bits.readLong(_data, _pos);
_pos += 8;
final long part2 = Bits.readLong(_data, _pos);
_pos += 8;
代码示例来源:origin: com.sequoiadb/sequoiadb-driver
_callback.gotDouble(name, Double.longBitsToDouble(Bits.readLong(_data, _pos)));
_pos += 8;
return true;
_callback.gotLong(name, Bits.readLong(_data, _pos));
_pos += 8;
return true;
_callback.gotDate(name, Bits.readLong(_data, _pos));
_pos += 8;
return true;
内容来源于网络,如有侵权,请联系作者删除!