本文整理了Java中java.io.RandomAccessFile.readDouble
方法的一些代码示例,展示了RandomAccessFile.readDouble
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。RandomAccessFile.readDouble
方法的具体详情如下:
包路径:java.io.RandomAccessFile
类名称:RandomAccessFile
方法名:readDouble
[英]Reads a big-endian 64-bit double from the current position in this file. Blocks until eight bytes have been read, the end of the file is reached or an exception is thrown.
[中]
代码示例来源:origin: atomix/atomix
@Override
public double readDouble(int offset) {
checkRead(offset, DOUBLE);
try {
seekToOffset(offset);
return randomAccessFile.readDouble();
} catch (IOException e) {
throw new RuntimeException(e);
}
}
代码示例来源:origin: apache/activemq
@Override
public double readDouble() throws IOException {
try {
return getRaf().readDouble();
} catch (IOException ioe) {
handleException();
throw ioe;
}
}
代码示例来源:origin: i2p/i2p.i2p
public double readDouble() throws IOException { return delegate.readDouble(); }
public float readFloat() throws IOException { return delegate.readFloat(); }
代码示例来源:origin: geotools/geotools
return raf.readFloat();
} else if (binding == Double.class || binding == double.class) {
return raf.readDouble();
} else if (binding == String.class) {
return raf.readUTF();
代码示例来源:origin: topjohnwu/libsu
@Override
public double readDouble() throws IOException {
return raf.readDouble();
}
代码示例来源:origin: org.jetbrains.intellij.deps/commons-vfs2
@Override
public double readDouble() throws IOException
{
return raf.readDouble();
}
代码示例来源:origin: scifio/scifio
@Override
public double readDouble() throws IOException {
return raf.readDouble();
}
代码示例来源:origin: io.scif/scifio
@Override
public double readDouble() throws IOException {
return raf.readDouble();
}
代码示例来源:origin: net.sourceforge/javaml
@Override
public double get(int col, int row) {
try {
matrix.seek((col * row + row) * 8);
return matrix.readDouble();
} catch (IOException e) {
System.err.println("Something went wrong, but we return 0 anyway.");
return 0;
}
}
代码示例来源:origin: io.atomix/atomix-storage
@Override
public double readDouble(int offset) {
checkRead(offset, DOUBLE);
try {
seekToOffset(offset);
return randomAccessFile.readDouble();
} catch (IOException e) {
throw new RuntimeException(e);
}
}
代码示例来源:origin: io.atomix/atomix-buffer
@Override
public double readDouble(int offset) {
checkRead(offset, DOUBLE);
try {
seekToOffset(offset);
return randomAccessFile.readDouble();
} catch (IOException e) {
throw new RuntimeException(e);
}
}
代码示例来源:origin: io.atomix/catalyst-buffer
@Override
public double readDouble(long offset) {
checkRead(offset, DOUBLE);
try {
seekToOffset(offset);
return randomAccessFile.readDouble();
} catch (IOException e) {
throw new RuntimeException(e);
}
}
代码示例来源:origin: io.atomix.catalyst/catalyst-buffer
@Override
public double readDouble(long offset) {
checkRead(offset, DOUBLE);
try {
seekToOffset(offset);
return randomAccessFile.readDouble();
} catch (IOException e) {
throw new RuntimeException(e);
}
}
代码示例来源:origin: atomix/catalyst
@Override
public double readDouble(long offset) {
checkRead(offset, DOUBLE);
try {
seekToOffset(offset);
return randomAccessFile.readDouble();
} catch (IOException e) {
throw new RuntimeException(e);
}
}
代码示例来源:origin: org.onosproject/onlab-thirdparty
@Override
public double readDouble(long offset) {
checkRead(offset, DOUBLE);
try {
seekToOffset(offset);
return randomAccessFile.readDouble();
} catch (IOException e) {
throw new RuntimeException(e);
}
}
代码示例来源:origin: stackoverflow.com
RandomAccessFile f = new RandomAccessFile("theRandomeAccessFile", "rw");
f.writeInt(1);
f.writeDouble(2.34);
f.writeUTF("SomeString");
f.writeChar('C');
f.seek(0);
System.err.println(f.readInt());
System.err.println(f.readDouble());
System.err.println(f.readUTF());
System.err.println(f.readChar());
代码示例来源:origin: org.apache.activemq/activemq-all
@Override
public double readDouble() throws IOException {
try {
return getRaf().readDouble();
} catch (IOException ioe) {
handleException();
throw ioe;
}
}
代码示例来源:origin: org.apache.activemq/activemq-kahadb-store
@Override
public double readDouble() throws IOException {
try {
return getRaf().readDouble();
} catch (IOException ioe) {
handleException();
throw ioe;
}
}
代码示例来源:origin: org.apache.activemq/activemq-osgi
@Override
public double readDouble() throws IOException {
try {
return getRaf().readDouble();
} catch (IOException ioe) {
handleException();
throw ioe;
}
}
代码示例来源:origin: octo-online/reactive-audit
@Test(expected = FileReactiveAuditException.class)
public void readDouble()
throws IOException
{
ReactiveAudit.off.commit();
try (RandomAccessFile rw = newRandomAccessFile())
{
TestTools.strict.commit();
rw.readDouble();
}
}
内容来源于网络,如有侵权,请联系作者删除!