本文整理了Java中java.io.ObjectInputStream.readFieldValues()
方法的一些代码示例,展示了ObjectInputStream.readFieldValues()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ObjectInputStream.readFieldValues()
方法的具体详情如下:
包路径:java.io.ObjectInputStream
类名称:ObjectInputStream
方法名:readFieldValues
[英]Reads a collection of field values for the emulated fields emulatedFields
[中]读取模拟字段SimulatedFields的字段值集合
代码示例来源:origin: robovm/robovm
/**
* Default method to read objects from this stream. Serializable fields
* defined in the object's class and superclasses are read from the source
* stream.
*
* @throws ClassNotFoundException
* if the object's class cannot be found.
* @throws IOException
* if an I/O error occurs while reading the object data.
* @throws NotActiveException
* if this method is not called from {@code readObject()}.
* @see ObjectOutputStream#defaultWriteObject
*/
public void defaultReadObject() throws IOException, ClassNotFoundException,
NotActiveException {
if (currentObject != null || !mustResolve) {
readFieldValues(currentObject, currentClass);
} else {
throw new NotActiveException();
}
}
代码示例来源:origin: robovm/robovm
/**
* Reads the persistent fields of the object that is currently being read
* from the source stream. The values read are stored in a GetField object
* that provides access to the persistent fields. This GetField object is
* then returned.
*
* @return the GetField object from which persistent fields can be accessed
* by name.
* @throws ClassNotFoundException
* if the class of an object being deserialized can not be
* found.
* @throws IOException
* if an error occurs while reading from this stream.
* @throws NotActiveException
* if this stream is currently not reading an object.
*/
public GetField readFields() throws IOException, ClassNotFoundException, NotActiveException {
if (currentObject == null) {
throw new NotActiveException();
}
EmulatedFieldsForLoading result = new EmulatedFieldsForLoading(currentClass);
readFieldValues(result);
return result;
}
代码示例来源:origin: com.jtransc/jtransc-rt
/**
* Default method to read objects from this stream. Serializable fields
* defined in the object's class and superclasses are read from the source
* stream.
*
* @throws ClassNotFoundException if the object's class cannot be found.
* @throws IOException if an I/O error occurs while reading the object data.
* @throws NotActiveException if this method is not called from {@code readObject()}.
* @see ObjectOutputStream#defaultWriteObject
*/
public void defaultReadObject() throws IOException, ClassNotFoundException,
NotActiveException {
if (currentObject != null || !mustResolve) {
readFieldValues(currentObject, currentClass);
} else {
throw new NotActiveException();
}
}
代码示例来源:origin: MobiVM/robovm
/**
* Default method to read objects from this stream. Serializable fields
* defined in the object's class and superclasses are read from the source
* stream.
*
* @throws ClassNotFoundException
* if the object's class cannot be found.
* @throws IOException
* if an I/O error occurs while reading the object data.
* @throws NotActiveException
* if this method is not called from {@code readObject()}.
* @see ObjectOutputStream#defaultWriteObject
*/
public void defaultReadObject() throws IOException, ClassNotFoundException,
NotActiveException {
if (currentObject != null || !mustResolve) {
readFieldValues(currentObject, currentClass);
} else {
throw new NotActiveException();
}
}
代码示例来源:origin: com.bugvm/bugvm-rt
/**
* Default method to read objects from this stream. Serializable fields
* defined in the object's class and superclasses are read from the source
* stream.
*
* @throws ClassNotFoundException
* if the object's class cannot be found.
* @throws IOException
* if an I/O error occurs while reading the object data.
* @throws NotActiveException
* if this method is not called from {@code readObject()}.
* @see ObjectOutputStream#defaultWriteObject
*/
public void defaultReadObject() throws IOException, ClassNotFoundException,
NotActiveException {
if (currentObject != null || !mustResolve) {
readFieldValues(currentObject, currentClass);
} else {
throw new NotActiveException();
}
}
代码示例来源:origin: ibinti/bugvm
/**
* Default method to read objects from this stream. Serializable fields
* defined in the object's class and superclasses are read from the source
* stream.
*
* @throws ClassNotFoundException
* if the object's class cannot be found.
* @throws IOException
* if an I/O error occurs while reading the object data.
* @throws NotActiveException
* if this method is not called from {@code readObject()}.
* @see ObjectOutputStream#defaultWriteObject
*/
public void defaultReadObject() throws IOException, ClassNotFoundException,
NotActiveException {
if (currentObject != null || !mustResolve) {
readFieldValues(currentObject, currentClass);
} else {
throw new NotActiveException();
}
}
代码示例来源:origin: com.mobidevelop.robovm/robovm-rt
/**
* Default method to read objects from this stream. Serializable fields
* defined in the object's class and superclasses are read from the source
* stream.
*
* @throws ClassNotFoundException
* if the object's class cannot be found.
* @throws IOException
* if an I/O error occurs while reading the object data.
* @throws NotActiveException
* if this method is not called from {@code readObject()}.
* @see ObjectOutputStream#defaultWriteObject
*/
public void defaultReadObject() throws IOException, ClassNotFoundException,
NotActiveException {
if (currentObject != null || !mustResolve) {
readFieldValues(currentObject, currentClass);
} else {
throw new NotActiveException();
}
}
代码示例来源:origin: com.gluonhq/robovm-rt
/**
* Default method to read objects from this stream. Serializable fields
* defined in the object's class and superclasses are read from the source
* stream.
*
* @throws ClassNotFoundException
* if the object's class cannot be found.
* @throws IOException
* if an I/O error occurs while reading the object data.
* @throws NotActiveException
* if this method is not called from {@code readObject()}.
* @see ObjectOutputStream#defaultWriteObject
*/
public void defaultReadObject() throws IOException, ClassNotFoundException,
NotActiveException {
if (currentObject != null || !mustResolve) {
readFieldValues(currentObject, currentClass);
} else {
throw new NotActiveException();
}
}
代码示例来源:origin: FlexoVM/flexovm
/**
* Default method to read objects from this stream. Serializable fields
* defined in the object's class and superclasses are read from the source
* stream.
*
* @throws ClassNotFoundException
* if the object's class cannot be found.
* @throws IOException
* if an I/O error occurs while reading the object data.
* @throws NotActiveException
* if this method is not called from {@code readObject()}.
* @see ObjectOutputStream#defaultWriteObject
*/
public void defaultReadObject() throws IOException, ClassNotFoundException,
NotActiveException {
if (currentObject != null || !mustResolve) {
readFieldValues(currentObject, currentClass);
} else {
throw new NotActiveException();
}
}
代码示例来源:origin: com.jtransc/jtransc-rt
/**
* Reads the persistent fields of the object that is currently being read
* from the source stream. The values read are stored in a GetField object
* that provides access to the persistent fields. This GetField object is
* then returned.
*
* @return the GetField object from which persistent fields can be accessed
* by name.
* @throws ClassNotFoundException if the class of an object being deserialized can not be
* found.
* @throws IOException if an error occurs while reading from this stream.
* @throws NotActiveException if this stream is currently not reading an object.
*/
public GetField readFields() throws IOException, ClassNotFoundException, NotActiveException {
if (currentObject == null) {
throw new NotActiveException();
}
EmulatedFieldsForLoading result = new EmulatedFieldsForLoading(currentClass);
readFieldValues(result);
return result;
}
代码示例来源:origin: ibinti/bugvm
/**
* Reads the persistent fields of the object that is currently being read
* from the source stream. The values read are stored in a GetField object
* that provides access to the persistent fields. This GetField object is
* then returned.
*
* @return the GetField object from which persistent fields can be accessed
* by name.
* @throws ClassNotFoundException
* if the class of an object being deserialized can not be
* found.
* @throws IOException
* if an error occurs while reading from this stream.
* @throws NotActiveException
* if this stream is currently not reading an object.
*/
public GetField readFields() throws IOException, ClassNotFoundException, NotActiveException {
if (currentObject == null) {
throw new NotActiveException();
}
EmulatedFieldsForLoading result = new EmulatedFieldsForLoading(currentClass);
readFieldValues(result);
return result;
}
代码示例来源:origin: com.bugvm/bugvm-rt
/**
* Reads the persistent fields of the object that is currently being read
* from the source stream. The values read are stored in a GetField object
* that provides access to the persistent fields. This GetField object is
* then returned.
*
* @return the GetField object from which persistent fields can be accessed
* by name.
* @throws ClassNotFoundException
* if the class of an object being deserialized can not be
* found.
* @throws IOException
* if an error occurs while reading from this stream.
* @throws NotActiveException
* if this stream is currently not reading an object.
*/
public GetField readFields() throws IOException, ClassNotFoundException, NotActiveException {
if (currentObject == null) {
throw new NotActiveException();
}
EmulatedFieldsForLoading result = new EmulatedFieldsForLoading(currentClass);
readFieldValues(result);
return result;
}
代码示例来源:origin: com.mobidevelop.robovm/robovm-rt
/**
* Reads the persistent fields of the object that is currently being read
* from the source stream. The values read are stored in a GetField object
* that provides access to the persistent fields. This GetField object is
* then returned.
*
* @return the GetField object from which persistent fields can be accessed
* by name.
* @throws ClassNotFoundException
* if the class of an object being deserialized can not be
* found.
* @throws IOException
* if an error occurs while reading from this stream.
* @throws NotActiveException
* if this stream is currently not reading an object.
*/
public GetField readFields() throws IOException, ClassNotFoundException, NotActiveException {
if (currentObject == null) {
throw new NotActiveException();
}
EmulatedFieldsForLoading result = new EmulatedFieldsForLoading(currentClass);
readFieldValues(result);
return result;
}
代码示例来源:origin: MobiVM/robovm
/**
* Reads the persistent fields of the object that is currently being read
* from the source stream. The values read are stored in a GetField object
* that provides access to the persistent fields. This GetField object is
* then returned.
*
* @return the GetField object from which persistent fields can be accessed
* by name.
* @throws ClassNotFoundException
* if the class of an object being deserialized can not be
* found.
* @throws IOException
* if an error occurs while reading from this stream.
* @throws NotActiveException
* if this stream is currently not reading an object.
*/
public GetField readFields() throws IOException, ClassNotFoundException, NotActiveException {
if (currentObject == null) {
throw new NotActiveException();
}
EmulatedFieldsForLoading result = new EmulatedFieldsForLoading(currentClass);
readFieldValues(result);
return result;
}
代码示例来源:origin: FlexoVM/flexovm
/**
* Reads the persistent fields of the object that is currently being read
* from the source stream. The values read are stored in a GetField object
* that provides access to the persistent fields. This GetField object is
* then returned.
*
* @return the GetField object from which persistent fields can be accessed
* by name.
* @throws ClassNotFoundException
* if the class of an object being deserialized can not be
* found.
* @throws IOException
* if an error occurs while reading from this stream.
* @throws NotActiveException
* if this stream is currently not reading an object.
*/
public GetField readFields() throws IOException, ClassNotFoundException, NotActiveException {
if (currentObject == null) {
throw new NotActiveException();
}
EmulatedFieldsForLoading result = new EmulatedFieldsForLoading(currentClass);
readFieldValues(result);
return result;
}
代码示例来源:origin: com.gluonhq/robovm-rt
/**
* Reads the persistent fields of the object that is currently being read
* from the source stream. The values read are stored in a GetField object
* that provides access to the persistent fields. This GetField object is
* then returned.
*
* @return the GetField object from which persistent fields can be accessed
* by name.
* @throws ClassNotFoundException
* if the class of an object being deserialized can not be
* found.
* @throws IOException
* if an error occurs while reading from this stream.
* @throws NotActiveException
* if this stream is currently not reading an object.
*/
public GetField readFields() throws IOException, ClassNotFoundException, NotActiveException {
if (currentObject == null) {
throw new NotActiveException();
}
EmulatedFieldsForLoading result = new EmulatedFieldsForLoading(currentClass);
readFieldValues(result);
return result;
}
内容来源于网络,如有侵权,请联系作者删除!