ucar.unidata.io.RandomAccessFile.writeLong()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(5.0k)|赞(0)|评价(0)|浏览(128)

本文整理了Java中ucar.unidata.io.RandomAccessFile.writeLong方法的一些代码示例,展示了RandomAccessFile.writeLong的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。RandomAccessFile.writeLong方法的具体详情如下:
包路径:ucar.unidata.io.RandomAccessFile
类名称:RandomAccessFile
方法名:writeLong

RandomAccessFile.writeLong介绍

[英]Writes a long to the file as eight bytes, high byte first.
[中]将long作为八个字节写入文件,首先是高字节。

代码示例

代码示例来源:origin: edu.ucar/netcdf

/**
 * Write an array of longs
 *
 * @param pa    write from this array
 * @param start starting with this element in the array
 * @param n     write this number of elements
 * @throws IOException on read error
 */
public final void writeLong(long[] pa, int start, int n) throws IOException {
 for (int i = 0; i < n; i++) {
  writeLong(pa[start + i]);
 }
}

代码示例来源:origin: edu.ucar/unidataCommon

/**
 * Write an array of longs
 *
 * @param pa    write from this array
 * @param start starting with this element in the array
 * @param n     write this number of elements
 * @throws IOException on read error
 */
public final void writeLong(long[] pa, int start, int n) throws IOException {
 for (int i = 0; i < n; i++) {
  writeLong(pa[start + i]);
 }
}

代码示例来源:origin: Unidata/thredds

/**
 * Write an array of longs
 *
 * @param pa    write from this array
 * @param start starting with this element in the array
 * @param n     write this number of elements
 * @throws IOException on read error
 */
public final void writeLong(long[] pa, int start, int n) throws IOException {
 for (int i = 0; i < n; i++) {
  writeLong(pa[start + i]);
 }
}

代码示例来源:origin: edu.ucar/cdm

/**
 * Write an array of longs
 *
 * @param pa    write from this array
 * @param start starting with this element in the array
 * @param n     write this number of elements
 * @throws IOException on read error
 */
public final void writeLong(long[] pa, int start, int n) throws IOException {
 for (int i = 0; i < n; i++) {
  writeLong(pa[start + i]);
 }
}

代码示例来源:origin: edu.ucar/cdm

/**
 * Converts the double argument to a <code>long</code> using the
 * <code>doubleToLongBits</code> method in class <code>Double</code>,
 * and then writes that <code>long</code> value to the file as an
 * 8-byte quantity, high byte first.
 *
 * @param v a <code>double</code> value to be written.
 * @throws IOException if an I/O error occurs.
 * @see java.lang.Double#doubleToLongBits(double)
 */
public final void writeDouble(double v) throws IOException {
 writeLong(Double.doubleToLongBits(v));
}

代码示例来源:origin: edu.ucar/netcdf

/**
 * Converts the double argument to a <code>long</code> using the
 * <code>doubleToLongBits</code> method in class <code>Double</code>,
 * and then writes that <code>long</code> value to the file as an
 * 8-byte quantity, high byte first.
 *
 * @param v a <code>double</code> value to be written.
 * @throws IOException if an I/O error occurs.
 * @see java.lang.Double#doubleToLongBits(double)
 */
public final void writeDouble(double v) throws IOException {
 writeLong(Double.doubleToLongBits(v));
}

代码示例来源:origin: edu.ucar/unidataCommon

/**
 * Converts the double argument to a <code>long</code> using the
 * <code>doubleToLongBits</code> method in class <code>Double</code>,
 * and then writes that <code>long</code> value to the file as an
 * 8-byte quantity, high byte first.
 *
 * @param v a <code>double</code> value to be written.
 * @throws IOException if an I/O error occurs.
 * @see java.lang.Double#doubleToLongBits(double)
 */
public final void writeDouble(double v) throws IOException {
 writeLong(Double.doubleToLongBits(v));
}

代码示例来源:origin: Unidata/thredds

/**
 * Converts the double argument to a <code>long</code> using the
 * <code>doubleToLongBits</code> method in class <code>Double</code>,
 * and then writes that <code>long</code> value to the file as an
 * 8-byte quantity, high byte first.
 *
 * @param v a <code>double</code> value to be written.
 * @throws IOException if an I/O error occurs.
 * @see java.lang.Double#doubleToLongBits(double)
 */
public final void writeDouble(double v) throws IOException {
 writeLong(Double.doubleToLongBits(v));
}

代码示例来源:origin: edu.ucar/netcdf

raf.writeLong(pos);
else {
 if (pos > Integer.MAX_VALUE)
 raf.writeLong(pos);
else
 raf.writeInt((int) pos);

代码示例来源:origin: edu.ucar/cdm

raf.writeLong(pos);
else {
 if (pos > Integer.MAX_VALUE)
 raf.writeLong(pos);
else
 raf.writeInt((int) pos);

代码示例来源:origin: Unidata/thredds

raf.writeLong(pos);
else {
 if (pos > Integer.MAX_VALUE)
 raf.writeLong(pos);
else
 raf.writeInt((int) pos);

代码示例来源:origin: Unidata/thredds

raf.writeInt(version);
long lenPos = raf.getFilePointer();
raf.writeLong(0); // save space to write the length of the record section
long countBytes = 0;
int countRecords = 0;
raf.writeLong(countBytes);

代码示例来源:origin: Unidata/thredds

raf.writeInt(version);
long lenPos = raf.getFilePointer();
raf.writeLong(0); // save space to write the length of the record section
long countBytes = 0;
int countRecords = 0;
raf.writeLong(countBytes);

代码示例来源:origin: edu.ucar/netcdf

long pos = raf.getFilePointer();
if (largeFile)
 raf.writeLong(0); // come back to this later
else
 raf.writeInt(0); // come back to this later

代码示例来源:origin: edu.ucar/cdm

long pos = raf.getFilePointer();
if (largeFile)
 raf.writeLong(0); // come back to this later
else
 raf.writeInt(0); // come back to this later

代码示例来源:origin: Unidata/thredds

long pos = raf.getFilePointer();
if (largeFile)
 raf.writeLong(0); // come back to this later
else
 raf.writeInt(0); // come back to this later

代码示例来源:origin: Unidata/thredds

raf.writeLong(0); // no record section

相关文章