本文整理了Java中ucar.unidata.io.RandomAccessFile.readDouble
方法的一些代码示例,展示了RandomAccessFile.readDouble
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。RandomAccessFile.readDouble
方法的具体详情如下:
包路径:ucar.unidata.io.RandomAccessFile
类名称:RandomAccessFile
方法名:readDouble
[英]Reads a double
from this file. This method reads a long
value as if by the readLong
method and then converts that long
to a double
using the longBitsToDouble
method in class Double
.
This method blocks until the eight bytes are read, the end of the stream is detected, or an exception is thrown.
[中]从该文件中读取double
。此方法读取long
值,就像通过readLong
方法一样,然后使用类Double
中的longBitsToDouble
方法将long
转换为double
。
此方法会一直阻塞,直到读取了八个字节、检测到流结束或引发异常为止。
代码示例来源:origin: edu.ucar/netcdf
private ProjectionRect readBoundingBox() throws IOException {
double xMin = raf.readDouble();
double yMin = raf.readDouble();
double xMax = raf.readDouble();
double yMax = raf.readDouble();
return new ProjectionRect(xMin, yMin, xMax, yMax);
}
代码示例来源:origin: edu.ucar/cdm
private ProjectionRect readBoundingBox() throws IOException {
double xMin = raf.readDouble();
double yMin = raf.readDouble();
double xMax = raf.readDouble();
double yMax = raf.readDouble();
return new ProjectionRect(xMin, yMin, xMax, yMax);
}
代码示例来源:origin: Unidata/thredds
private ProjectionRect readBoundingBox() throws IOException {
double xMin = raf.readDouble();
double yMin = raf.readDouble();
double xMax = raf.readDouble();
double yMax = raf.readDouble();
return new ProjectionRect(xMin, yMin, xMax, yMax);
}
代码示例来源:origin: Unidata/thredds
Object readDoubleArray1D(int offsetInRecord) throws IOException {
int elementSizeInBytes = 8;
double[] array = new double[header.getNumDataRecords()];
this.raf.seek(header.getRecordSizeInBytes() * header.getNumHeaderRecords() + offsetInRecord);
for (int i = 0; i < header.getNumDataRecords(); i++) {
this.raf.readDouble(array, i, 1);
this.raf.skipBytes(header.getRecordSizeInBytes() - elementSizeInBytes);
}
return (array);
}
代码示例来源:origin: edu.ucar/netcdf
Object readDoubleArray1D(int offsetInRecord) throws IOException {
int elementSizeInBytes = 8;
double[] array = new double[header.getNumDataRecords()];
this.raf.seek(header.getRecordSizeInBytes() * header.getNumHeaderRecords() + offsetInRecord);
for (int i = 0; i < header.getNumDataRecords(); i++) {
this.raf.readDouble(array, i, 1);
this.raf.skipBytes(header.getRecordSizeInBytes() - elementSizeInBytes);
}
return (array);
}
代码示例来源:origin: edu.ucar/cdm
Object readDoubleArray1D(int offsetInRecord) throws IOException {
int elementSizeInBytes = 8;
double[] array = new double[header.getNumDataRecords()];
this.raf.seek(header.getRecordSizeInBytes() * header.getNumHeaderRecords() + offsetInRecord);
for (int i = 0; i < header.getNumDataRecords(); i++) {
this.raf.readDouble(array, i, 1);
this.raf.skipBytes(header.getRecordSizeInBytes() - elementSizeInBytes);
}
return (array);
}
代码示例来源:origin: edu.ucar/netcdf
double d = raf.readDouble();
代码示例来源:origin: edu.ucar/cdm
double d = raf.readDouble();
代码示例来源:origin: Unidata/thredds
double d = raf.readDouble();
代码示例来源:origin: Unidata/thredds
case 6:
if (nelems == 1)
att = new Attribute(name, raf.readDouble());
else {
double[] vals = new double[nelems];
for (int i = 0; i < nelems; i++)
vals[i] = raf.readDouble();
att = new Attribute(name, Array.factory(DataType.DOUBLE, new int[]{nelems}, vals));
代码示例来源:origin: Unidata/thredds
double[] pa = new double[heapId.nelems];
raf.seek(ho.dataPos);
raf.readDouble(pa, 0, pa.length);
return Array.factory(dataType, new int[]{pa.length}, pa);
代码示例来源:origin: edu.ucar/cdm
double[] pa = new double[heapId.nelems];
raf.seek(ho.dataPos);
raf.readDouble(pa, 0, pa.length);
return Array.factory(dataType.getPrimitiveClassType(), new int[]{pa.length}, pa);
代码示例来源:origin: edu.ucar/cdm
case 6:
if (nelems == 1)
att = new Attribute(name, raf.readDouble());
else {
double[] vals = new double[nelems];
for (int i = 0; i < nelems; i++)
vals[i] = raf.readDouble();
att = new Attribute(name, Array.factory(DataType.DOUBLE.getPrimitiveClassType(), new int[]{nelems}, vals));
代码示例来源:origin: edu.ucar/netcdf
double[] pa = new double[heapId.nelems];
raf.seek(ho.dataPos);
raf.readDouble(pa, 0, pa.length);
return Array.factory(dataType.getPrimitiveClassType(), new int[]{pa.length}, pa);
代码示例来源:origin: edu.ucar/netcdf
case 6:
if (nelems == 1)
att = new Attribute(name, raf.readDouble());
else {
double[] vals = new double[nelems];
for (int i = 0; i < nelems; i++)
vals[i] = raf.readDouble();
att = new Attribute(name, Array.factory(DataType.DOUBLE.getPrimitiveClassType(), new int[]{nelems}, vals));
代码示例来源:origin: edu.ucar/netcdf
raf.order(byteOrder);
raf.seek(chunk.getSrcPos());
raf.readDouble(pa, (int) chunk.getDestElem(), chunk.getNelems());
代码示例来源:origin: edu.ucar/cdm
raf.order(byteOrder);
raf.seek(chunk.getSrcPos());
raf.readDouble(pa, (int) chunk.getDestElem(), chunk.getNelems());
代码示例来源:origin: Unidata/thredds
raf.order(byteOrder);
raf.seek(chunk.getSrcPos());
raf.readDouble(pa, (int) chunk.getDestElem(), chunk.getNelems());
内容来源于网络,如有侵权,请联系作者删除!