java.io.ObjectOutputStream.writeDouble()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(6.7k)|赞(0)|评价(0)|浏览(180)

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

ObjectOutputStream.writeDouble介绍

[英]Writes a double (64 bit) to the target stream.
[中]将双精度(64位)写入目标流。

代码示例

代码示例来源:origin: google/guava

/**
 * Saves the state to a stream (that is, serializes it).
 *
 * @serialData The current value is emitted (a {@code double}).
 */
private void writeObject(java.io.ObjectOutputStream s) throws java.io.IOException {
 s.defaultWriteObject();
 s.writeDouble(get());
}

代码示例来源:origin: prestodb/presto

/**
 * Saves the state to a stream (that is, serializes it).
 *
 * @serialData The current value is emitted (a {@code double}).
 */
private void writeObject(java.io.ObjectOutputStream s) throws java.io.IOException {
 s.defaultWriteObject();
 s.writeDouble(get());
}

代码示例来源:origin: stanfordnlp/CoreNLP

/**
 * Saves the state to a stream (that is, serializes it).
 *
 * @param s the stream
 * @throws java.io.IOException if an I/O error occurs
 * @serialData The current value is emitted (a {@code double}).
 */
private void writeObject(java.io.ObjectOutputStream s)
    throws java.io.IOException {
 s.defaultWriteObject();
 s.writeDouble(get());
}

代码示例来源:origin: google/j2objc

/**
 * Saves the state to a stream (that is, serializes it).
 *
 * @serialData The current value is emitted (a {@code double}).
 */
private void writeObject(java.io.ObjectOutputStream s) throws java.io.IOException {
 s.defaultWriteObject();
 s.writeDouble(get());
}

代码示例来源:origin: google/guava

/**
 * Saves the state to a stream (that is, serializes it).
 *
 * @serialData The length of the array is emitted (int), followed by all of its elements (each a
 *     {@code double}) in the proper order.
 */
private void writeObject(java.io.ObjectOutputStream s) throws java.io.IOException {
 s.defaultWriteObject();
 // Write out array length
 int length = length();
 s.writeInt(length);
 // Write out all elements in the proper order.
 for (int i = 0; i < length; i++) {
  s.writeDouble(get(i));
 }
}

代码示例来源:origin: wildfly/wildfly

/**
 * Saves the state to a stream (that is, serializes it).
 *
 * @serialData The current value is emitted (a {@code double}).
 */
private void writeObject(java.io.ObjectOutputStream s) throws java.io.IOException {
 s.defaultWriteObject();
 s.writeDouble(get());
}

代码示例来源:origin: prestodb/presto

/**
 * Saves the state to a stream (that is, serializes it).
 *
 * @serialData The length of the array is emitted (int), followed by all of its elements (each a
 *     {@code double}) in the proper order.
 */
private void writeObject(java.io.ObjectOutputStream s) throws java.io.IOException {
 s.defaultWriteObject();
 // Write out array length
 int length = length();
 s.writeInt(length);
 // Write out all elements in the proper order.
 for (int i = 0; i < length; i++) {
  s.writeDouble(get(i));
 }
}

代码示例来源:origin: google/j2objc

/**
 * Saves the state to a stream (that is, serializes it).
 *
 * @serialData The length of the array is emitted (int), followed by all of its elements (each a
 *     {@code double}) in the proper order.
 */
private void writeObject(java.io.ObjectOutputStream s) throws java.io.IOException {
 s.defaultWriteObject();
 // Write out array length
 int length = length();
 s.writeInt(length);
 // Write out all elements in the proper order.
 for (int i = 0; i < length; i++) {
  s.writeDouble(get(i));
 }
}

代码示例来源:origin: stackoverflow.com

public class MyDummyClass implements java.io.Serialiazable {
  // mark it transient so defaultReadObject()/defaultWriteObject() ignore it
  private transient com.google.android.gms.maps.model.LatLng mLocation;

  // ...

  private void writeObject(ObjectOutputStream out) throws IOException {
    out.defaultWriteObject();
    out.writeDouble(mLocation.latitude);
    out.writeDouble(mLocation.longitude);
  }

  private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
    in.defaultReadObject();
    mLocation = new LatLng(in.readDouble(), in.readDouble());
  }
}

代码示例来源:origin: wildfly/wildfly

/**
 * Saves the state to a stream (that is, serializes it).
 *
 * @serialData The length of the array is emitted (int), followed by all of its elements (each a
 *     {@code double}) in the proper order.
 */
private void writeObject(java.io.ObjectOutputStream s) throws java.io.IOException {
 s.defaultWriteObject();
 // Write out array length
 int length = length();
 s.writeInt(length);
 // Write out all elements in the proper order.
 for (int i = 0; i < length; i++) {
  s.writeDouble(get(i));
 }
}

代码示例来源:origin: geotools/geotools

/**
 * Write this object to the specified stream. This method is necessary because the super-class
 * is not serializable.
 */
private void writeObject(final ObjectOutputStream out) throws IOException {
  out.defaultWriteObject();
  out.writeDouble(x);
  out.writeDouble(y);
  out.writeDouble(z);
}

代码示例来源:origin: geotools/geotools

/**
 * Write this object to the specified stream. This method is necessary because the super-class
 * is not serializable.
 */
private void writeObject(final ObjectOutputStream out) throws IOException {
  out.defaultWriteObject();
  out.writeDouble(x);
  out.writeDouble(y);
}

代码示例来源:origin: prometheus/client_java

private void writeObject(ObjectOutputStream s) throws IOException {
  s.defaultWriteObject();
  s.writeDouble(sum());
}

代码示例来源:origin: it.unimi.dsi/fastutil

private void writeObject(java.io.ObjectOutputStream s) throws java.io.IOException {
  s.defaultWriteObject();
  for (int i = 0; i < size; i++)
    s.writeDouble(a[i]);
}
private void readObject(java.io.ObjectInputStream s) throws java.io.IOException, ClassNotFoundException {

代码示例来源:origin: it.unimi.dsi/fastutil

private void writeObject(java.io.ObjectOutputStream s) throws java.io.IOException {
  s.defaultWriteObject();
  s.writeInt(array.length);
  for (int i = 0; i < size; i++)
    s.writeDouble(array[i]);
}

代码示例来源:origin: it.unimi.dsi/fastutil

private void writeObject(java.io.ObjectOutputStream s) throws java.io.IOException {
  s.defaultWriteObject();
  for (int i = 0; i < size; i++) {
    s.writeLong(key[i]);
    s.writeDouble(value[i]);
  }
}
private void readObject(java.io.ObjectInputStream s) throws java.io.IOException, ClassNotFoundException {

代码示例来源:origin: it.unimi.dsi/fastutil

private void writeObject(java.io.ObjectOutputStream s) throws java.io.IOException {
  s.defaultWriteObject();
  for (int i = 0; i < size; i++) {
    s.writeDouble(key[i]);
    s.writeInt(value[i]);
  }
}
private void readObject(java.io.ObjectInputStream s) throws java.io.IOException, ClassNotFoundException {

代码示例来源:origin: it.unimi.dsi/fastutil

private void writeObject(java.io.ObjectOutputStream s) throws java.io.IOException {
  s.defaultWriteObject();
  for (int i = 0; i < size; i++) {
    s.writeDouble(key[i]);
    s.writeLong(value[i]);
  }
}
private void readObject(java.io.ObjectInputStream s) throws java.io.IOException, ClassNotFoundException {

代码示例来源:origin: it.unimi.dsi/fastutil

private void writeObject(java.io.ObjectOutputStream s) throws java.io.IOException {
  s.defaultWriteObject();
  for (int i = 0; i < size; i++) {
    s.writeObject(key[i]);
    s.writeDouble(value[i]);
  }
}
private void readObject(java.io.ObjectInputStream s) throws java.io.IOException, ClassNotFoundException {

代码示例来源:origin: it.unimi.dsi/fastutil

private void writeObject(java.io.ObjectOutputStream s) throws java.io.IOException {
  final double key[] = this.key;
  final double value[] = this.value;
  final MapIterator i = new MapIterator();
  s.defaultWriteObject();
  for (int j = size, e; j-- != 0;) {
    e = i.nextEntry();
    s.writeDouble(key[e]);
    s.writeDouble(value[e]);
  }
}

相关文章

ObjectOutputStream类方法