本文整理了Java中java.io.ObjectInputStream.readFloat()
方法的一些代码示例,展示了ObjectInputStream.readFloat()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ObjectInputStream.readFloat()
方法的具体详情如下:
包路径:java.io.ObjectInputStream
类名称:ObjectInputStream
方法名:readFloat
[英]Reads a float (32 bit) from the source stream.
[中]
代码示例来源:origin: robovm/robovm
@SuppressWarnings("unchecked")
private void readObject(ObjectInputStream stream) throws IOException,
ClassNotFoundException {
stream.defaultReadObject();
int length = stream.readInt();
float loadFactor = stream.readFloat();
backingMap = createBackingMap(length, loadFactor);
int elementCount = stream.readInt();
for (int i = elementCount; --i >= 0;) {
E key = (E) stream.readObject();
backingMap.put(key, this);
}
}
代码示例来源:origin: commons-collections/commons-collections
this.keyType = in.readInt();
this.valueType = in.readInt();
this.purgeValues = in.readBoolean();
this.loadFactor = in.readFloat();
int capacity = in.readInt();
init();
data = new HashEntry[capacity];
代码示例来源:origin: it.unimi.dsi/fastutil
private void readObject(java.io.ObjectInputStream s) throws java.io.IOException, ClassNotFoundException {
s.defaultReadObject();
key = new float[size];
value = new float[size];
for (int i = 0; i < size; i++) {
key[i] = s.readFloat();
value[i] = s.readFloat();
}
}
}
代码示例来源:origin: webx/citrus
/**
* 从输入流中重建集合(也就是反序列化).
*
* @param is 输入流
* @throws IOException 输入流异常
* @throws ClassNotFoundException 类未找到
*/
private void readObject(ObjectInputStream is) throws IOException, ClassNotFoundException {
is.defaultReadObject();
int capacity = is.readInt();
float loadFactor = is.readFloat();
map = new ArrayHashMap<E, Object>(capacity, loadFactor);
int size = is.readInt();
for (int i = 0; i < size; i++) {
@SuppressWarnings("unchecked")
E e = (E) is.readObject();
map.put(e, PRESENT);
}
}
代码示例来源:origin: it.unimi.dsi/fastutil
private void readObject(java.io.ObjectInputStream s) throws java.io.IOException, ClassNotFoundException {
s.defaultReadObject();
a = new float[size];
for (int i = 0; i < size; i++)
a[i] = s.readFloat();
}
}
代码示例来源:origin: commons-collections/commons-collections
loadFactor = in.readFloat();
int capacity = in.readInt();
int size = in.readInt();
init();
threshold = calculateThreshold(capacity, loadFactor);
代码示例来源:origin: webx/citrus
/**
* 从输入流中重建集合(也就是反序列化).
*
* @param is 输入流
* @throws IOException 输入流异常
* @throws ClassNotFoundException 类未找到
*/
private void readObject(ObjectInputStream is) throws IOException, ClassNotFoundException {
is.defaultReadObject();
int capacity = is.readInt();
float loadFactor = is.readFloat();
map = new ArrayHashMap<E, Object>(capacity, loadFactor);
int size = is.readInt();
for (int i = 0; i < size; i++) {
@SuppressWarnings("unchecked")
E e = (E) is.readObject();
map.put(e, PRESENT);
}
}
代码示例来源:origin: it.unimi.dsi/fastutil
private void readObject(java.io.ObjectInputStream s) throws java.io.IOException, ClassNotFoundException {
s.defaultReadObject();
a = new float[size];
for (int i = 0; i < size; i++)
a[i] = s.readFloat();
}
}
代码示例来源:origin: wildfly/wildfly
this.keyType = in.readInt();
this.valueType = in.readInt();
this.purgeValues = in.readBoolean();
this.loadFactor = in.readFloat();
int capacity = in.readInt();
init();
data = new HashEntry[capacity];
代码示例来源:origin: webx/citrus
/**
* 从输入流中重建集合(也就是反序列化).
*
* @param is 输入流
* @throws IOException 输入流异常
* @throws ClassNotFoundException 类未找到
*/
private void readObject(ObjectInputStream is) throws IOException, ClassNotFoundException {
is.defaultReadObject();
int capacity = is.readInt();
float loadFactor = is.readFloat();
map = new ArrayHashMap<E, Object>(capacity, loadFactor);
int size = is.readInt();
for (int i = 0; i < size; i++) {
@SuppressWarnings("unchecked")
E e = (E) is.readObject();
map.put(e, PRESENT);
}
}
代码示例来源:origin: it.unimi.dsi/fastutil
private void readObject(java.io.ObjectInputStream s) throws java.io.IOException, ClassNotFoundException {
s.defaultReadObject();
key = new long[size];
value = new float[size];
for (int i = 0; i < size; i++) {
key[i] = s.readLong();
value[i] = s.readFloat();
}
}
}
代码示例来源:origin: wildfly/wildfly
loadFactor = in.readFloat();
int capacity = in.readInt();
int size = in.readInt();
init();
threshold = calculateThreshold(capacity, loadFactor);
代码示例来源:origin: it.unimi.dsi/fastutil
private void readObject(java.io.ObjectInputStream s) throws java.io.IOException, ClassNotFoundException {
s.defaultReadObject();
array = new float[s.readInt()];
for (int i = 0; i < size; i++)
array[i] = s.readFloat();
}
}
代码示例来源:origin: it.unimi.dsi/fastutil
private void readObject(java.io.ObjectInputStream s) throws java.io.IOException, ClassNotFoundException {
s.defaultReadObject();
key = new Object[size];
value = new float[size];
for (int i = 0; i < size; i++) {
key[i] = s.readObject();
value[i] = s.readFloat();
}
}
}
代码示例来源:origin: jphp-group/jphp
loadFactor = in.readFloat();
int capacity = in.readInt();
int size = in.readInt();
init();
data = new HashEntry[capacity];
代码示例来源:origin: it.unimi.dsi/fastutil
private void readObject(java.io.ObjectInputStream s) throws java.io.IOException, ClassNotFoundException {
s.defaultReadObject();
heap = new float[s.readInt()];
for (int i = 0; i < size; i++)
heap[i] = s.readFloat();
}
}
代码示例来源:origin: it.unimi.dsi/fastutil
private void readObject(java.io.ObjectInputStream s) throws java.io.IOException, ClassNotFoundException {
s.defaultReadObject();
key = new float[size];
value = new boolean[size];
for (int i = 0; i < size; i++) {
key[i] = s.readFloat();
value[i] = s.readBoolean();
}
}
}
代码示例来源:origin: org.apache.commons/commons-collections4
loadFactor = in.readFloat();
final int capacity = in.readInt();
final int size = in.readInt();
init();
threshold = calculateThreshold(capacity, loadFactor);
代码示例来源:origin: it.unimi.dsi/fastutil
private void readObject(java.io.ObjectInputStream s) throws java.io.IOException, ClassNotFoundException {
s.defaultReadObject();
key = new float[size];
value = new int[size];
for (int i = 0; i < size; i++) {
key[i] = s.readFloat();
value[i] = s.readInt();
}
}
}
代码示例来源:origin: it.unimi.dsi/fastutil
private void readObject(java.io.ObjectInputStream s) throws java.io.IOException, ClassNotFoundException {
s.defaultReadObject();
key = new Object[size];
value = new float[size];
for (int i = 0; i < size; i++) {
key[i] = s.readObject();
value[i] = s.readFloat();
}
}
}
内容来源于网络,如有侵权,请联系作者删除!