本文整理了Java中java.io.ObjectOutputStream.writeFloat()
方法的一些代码示例,展示了ObjectOutputStream.writeFloat()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ObjectOutputStream.writeFloat()
方法的具体详情如下:
包路径:java.io.ObjectOutputStream
类名称:ObjectOutputStream
方法名:writeFloat
[英]Writes a float (32 bit) to the target stream.
[中]将浮点(32位)写入目标流。
代码示例来源:origin: robovm/robovm
private void writeObject(ObjectOutputStream stream) throws IOException {
stream.defaultWriteObject();
stream.writeInt(backingMap.table.length);
stream.writeFloat(HashMap.DEFAULT_LOAD_FACTOR);
stream.writeInt(size());
for (E e : this) {
stream.writeObject(e);
}
}
代码示例来源:origin: webx/citrus
/**
* 将集合的状态保存到输出流中(也就是序列化).
*
* @param os 输出流
* @throws IOException 输出流异常
*/
private void writeObject(ObjectOutputStream os) throws IOException {
os.defaultWriteObject();
os.writeInt(map.getCapacity());
os.writeFloat(map.getLoadFactor());
os.writeInt(map.size());
for (E e : map.keySet()) {
os.writeObject(e);
}
}
}
代码示例来源:origin: webx/citrus
/**
* 将集合的状态保存到输出流中(也就是序列化).
*
* @param os 输出流
* @throws IOException 输出流异常
*/
private void writeObject(ObjectOutputStream os) throws IOException {
os.defaultWriteObject();
os.writeInt(map.getCapacity());
os.writeFloat(map.getLoadFactor());
os.writeInt(map.size());
for (E e : map.keySet()) {
os.writeObject(e);
}
}
}
代码示例来源:origin: webx/citrus
/**
* 将集合的状态保存到输出流中(也就是序列化).
*
* @param os 输出流
* @throws IOException 输出流异常
*/
private void writeObject(ObjectOutputStream os) throws IOException {
os.defaultWriteObject();
os.writeInt(map.getCapacity());
os.writeFloat(map.getLoadFactor());
os.writeInt(map.size());
for (E e : map.keySet()) {
os.writeObject(e);
}
}
}
代码示例来源: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.writeFloat(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.writeObject(key[i]);
s.writeFloat(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.writeFloat(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();
s.writeInt(heap.length);
for (int i = 0; i < size; i++)
s.writeFloat(heap[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.writeFloat(key[i]);
s.writeObject(value[i]);
}
}
private void readObject(java.io.ObjectInputStream s) throws java.io.IOException, ClassNotFoundException {
代码示例来源:origin: MobiVM/robovm
private void writeObject(ObjectOutputStream stream) throws IOException {
stream.defaultWriteObject();
stream.writeInt(backingMap.table.length);
stream.writeFloat(HashMap.DEFAULT_LOAD_FACTOR);
stream.writeInt(size());
for (E e : this) {
stream.writeObject(e);
}
}
代码示例来源: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.writeShort(key[i]);
s.writeFloat(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 {
int n = count;
EntryIterator i = new EntryIterator();
Entry e;
s.defaultWriteObject();
while (n-- != 0) {
e = i.nextEntry();
s.writeFloat(e.key);
s.writeFloat(e.value);
}
}
/**
代码示例来源:origin: it.unimi.dsi/fastutil
private void writeObject(java.io.ObjectOutputStream s) throws java.io.IOException {
final float key[] = this.key;
final V value[] = this.value;
final MapIterator i = new MapIterator();
s.defaultWriteObject();
for (int j = size, e; j-- != 0;) {
e = i.nextEntry();
s.writeFloat(key[e]);
s.writeObject(value[e]);
}
}
@SuppressWarnings("unchecked")
代码示例来源:origin: it.unimi.dsi/fastutil
private void writeObject(java.io.ObjectOutputStream s) throws java.io.IOException {
final float key[] = this.key;
final V value[] = this.value;
final MapIterator i = new MapIterator();
s.defaultWriteObject();
for (int j = size, e; j-- != 0;) {
e = i.nextEntry();
s.writeFloat(key[e]);
s.writeObject(value[e]);
}
}
@SuppressWarnings("unchecked")
代码示例来源:origin: it.unimi.dsi/fastutil
private void writeObject(java.io.ObjectOutputStream s) throws java.io.IOException {
final long key[] = this.key;
final float value[] = this.value;
final MapIterator i = new MapIterator();
s.defaultWriteObject();
for (int j = size, e; j-- != 0;) {
e = i.nextEntry();
s.writeLong(key[e]);
s.writeFloat(value[e]);
}
}
代码示例来源:origin: it.unimi.dsi/fastutil
private void writeObject(java.io.ObjectOutputStream s) throws java.io.IOException {
final int key[] = this.key;
final float value[] = this.value;
final MapIterator i = new MapIterator();
s.defaultWriteObject();
for (int j = size, e; j-- != 0;) {
e = i.nextEntry();
s.writeInt(key[e]);
s.writeFloat(value[e]);
}
}
代码示例来源:origin: it.unimi.dsi/fastutil
private void writeObject(java.io.ObjectOutputStream s) throws java.io.IOException {
int n = count;
EntryIterator i = new EntryIterator();
Entry e;
s.defaultWriteObject();
while (n-- != 0) {
e = i.nextEntry();
s.writeFloat(e.key);
s.writeInt(e.value);
}
}
/**
代码示例来源:origin: it.unimi.dsi/fastutil
private void writeObject(java.io.ObjectOutputStream s) throws java.io.IOException {
final float key[] = this.key;
final V value[] = this.value;
final MapIterator i = new MapIterator();
s.defaultWriteObject();
for (int j = size, e; j-- != 0;) {
e = i.nextEntry();
s.writeFloat(key[e]);
s.writeObject(value[e]);
}
}
@SuppressWarnings("unchecked")
代码示例来源:origin: it.unimi.dsi/fastutil
private void writeObject(java.io.ObjectOutputStream s) throws java.io.IOException {
final long key[] = this.key;
final float value[] = this.value;
final MapIterator i = new MapIterator();
s.defaultWriteObject();
for (int j = size, e; j-- != 0;) {
e = i.nextEntry();
s.writeLong(key[e]);
s.writeFloat(value[e]);
}
}
代码示例来源:origin: it.unimi.dsi/fastutil
private void writeObject(java.io.ObjectOutputStream s) throws java.io.IOException {
final int key[] = this.key;
final float value[] = this.value;
final MapIterator i = new MapIterator();
s.defaultWriteObject();
for (int j = size, e; j-- != 0;) {
e = i.nextEntry();
s.writeInt(key[e]);
s.writeFloat(value[e]);
}
}
内容来源于网络,如有侵权,请联系作者删除!