本文整理汇总了Java中com.google.common.io.LittleEndianDataInputStream.readFloat方法的典型用法代码示例。如果您正苦于以下问题:Java LittleEndianDataInputStream.readFloat方法的具体用法?Java LittleEndianDataInputStream.readFloat怎么用?Java LittleEndianDataInputStream.readFloat使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.google.common.io.LittleEndianDataInputStream
的用法示例。
在下文中一共展示了LittleEndianDataInputStream.readFloat方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: readFloatArray
import com.google.common.io.LittleEndianDataInputStream; //导入方法依赖的package包/类
protected float[] readFloatArray(LittleEndianDataInputStream s) throws IOException {
int len = s.readInt() / 4;
float[] fs = new float[len];
for (int i = 0; i < len; ++i) {
fs[i] = s.readFloat();
}
return fs;
}
示例2: readDoubleWhichShouldBeFloatArray
import com.google.common.io.LittleEndianDataInputStream; //导入方法依赖的package包/类
protected double[] readDoubleWhichShouldBeFloatArray(LittleEndianDataInputStream s) throws IOException {
int len = s.readInt() / 4;
double[] fs = new double[len];
for (int i = 0; i < len; ++i) {
// TODO ask IOS to return doubles
fs[i] = s.readFloat();
}
return fs;
}
示例3: readData
import com.google.common.io.LittleEndianDataInputStream; //导入方法依赖的package包/类
/**
*
* @param datastream
* @return
* @throws IOException
*/
public static SurfaceCellOil readData(LittleEndianDataInputStream datastream) throws IOException {
SurfaceCellOil data = new SurfaceCellOil();
data.cellIndex = datastream.readInt();
data.thickness = datastream.readFloat();
data.emulsionWaterContent = datastream.readFloat();
data.emulsionViscosity = datastream.readFloat();
data.coverage = datastream.readFloat();
return data;
}
示例4: readData
import com.google.common.io.LittleEndianDataInputStream; //导入方法依赖的package包/类
/**
*
* @param datastream
* @return
* @throws IOException
*/
public static SurfaceCellGas readData(
LittleEndianDataInputStream datastream) throws IOException {
SurfaceCellGas data = new SurfaceCellGas();
data.cellIndex = datastream.readInt();
data.massFlux = datastream.readFloat();
data.voidFraction = datastream.readFloat();
return data;
}
示例5: Release
import com.google.common.io.LittleEndianDataInputStream; //导入方法依赖的package包/类
/**
*
* @param dataStream
* @param numberComponentsInProfile
* @throws IOException
*/
public Release(LittleEndianDataInputStream dataStream, int numberComponentsInProfile) throws IOException {
short lengthOfProfileName;
lengthOfProfileName = dataStream.readShort();
this.profile = getString(dataStream, lengthOfProfileName);
this.releaseRate = dataStream.readFloat();
this.componentConcentrations = new Vector<Float>();
for (int i = 0; i < numberComponentsInProfile; i++) {
this.componentConcentrations.add(Float.valueOf(dataStream.readFloat()));
}
}
示例6: readData
import com.google.common.io.LittleEndianDataInputStream; //导入方法依赖的package包/类
public static Summary readData(LittleEndianDataInputStream datastream,
int fileversion) throws IOException {
Summary summary = new Summary();
float daysSinceStart = datastream.readFloat();
System.out.println("Reading data for day " + daysSinceStart);
summary.setDaysSinceStart(daysSinceStart);
summary.setJulday(datastream.readInt());
summary.setUw(datastream.readFloat());
summary.setVw(datastream.readFloat());
summary.setWatsrf(datastream.readFloat());
summary.setWatclmn(datastream.readFloat());
summary.setSumsed(datastream.readFloat());
summary.setAtmos(datastream.readFloat());
summary.setDecay(datastream.readFloat());
summary.setSumcln(datastream.readFloat());
summary.setQ_skimmed(datastream.readFloat());
summary.setQ_dispersed(datastream.readFloat());
summary.setQ_sburned(datastream.readFloat());
summary.setQ_bburned(datastream.readFloat());
summary.setAshor(datastream.readFloat());
summary.setTotmas(datastream.readFloat());
summary.setOutsid(datastream.readFloat());
summary.setSfarea(datastream.readFloat());
summary.setNspilsubm(datastream.readInt());
summary.setNspilthin(datastream.readInt());
summary.setNspilmed(datastream.readInt());
summary.setNspilthick(datastream.readInt());
summary.setThc(datastream.readFloat());
summary.setNspiltot(datastream.readInt());
summary.setNptnow(datastream.readInt());
summary.setNorgnsm(datastream.readInt());
if (fileversion >= GRF.GRFFILEGASVERSION) { // gas bubbles from
// version 23
summary.setNumGasBubbles(datastream.readInt());
}
summary.setNcellsshore(datastream.readInt());
summary.setNcellssed(datastream.readInt());
summary.setNvess_active(datastream.readInt());
summary.setXmin_conc(datastream.readFloat());
summary.setYmin_conc(datastream.readFloat());
summary.setZmin(datastream.readFloat());
summary.setDx_conc(datastream.readFloat());
summary.setDy_conc(datastream.readFloat());
summary.setnX_conc(datastream.readShort());
summary.setnY_conc(datastream.readShort());
summary.setnZ_conc(datastream.readShort());
summary.setXmin_surf(datastream.readFloat());
summary.setYmin_surf(datastream.readFloat());
summary.setDx_surf(datastream.readFloat());
summary.setDy_surf(datastream.readFloat());
summary.setnX_surf(datastream.readShort());
summary.setnY_surf(datastream.readShort());
summary.setNcellssurf(datastream.readInt());
if (fileversion >= GRF.GRFFILEGASVERSION) { // gas surface grids from
// version 23
summary.setXmin_gas(datastream.readFloat());
summary.setYmin_gas(datastream.readFloat());
summary.setDx_gas(datastream.readFloat());
summary.setDy_gas(datastream.readFloat());
summary.setnX_gas(datastream.readShort());
summary.setnY_gas(datastream.readShort());
summary.setNcellsgas(datastream.readInt());
}
summary.setHasPlume(datastream.read() != 0);
return summary;
}