本文整理了Java中java.io.ObjectOutputStream.writeCyclicReference()
方法的一些代码示例,展示了ObjectOutputStream.writeCyclicReference()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ObjectOutputStream.writeCyclicReference()
方法的具体详情如下:
包路径:java.io.ObjectOutputStream
类名称:ObjectOutputStream
方法名:writeCyclicReference
[英]Writes a handle representing a cyclic reference (object previously dumped).
[中]写入表示循环引用(以前转储的对象)的句柄。
代码示例来源:origin: robovm/robovm
/**
* Dumps the parameter {@code obj} only if it is {@code null}
* or an object that has already been dumped previously.
*
* @param obj
* Object to check if an instance previously dumped by this
* stream.
* @return -1 if it is an instance which has not been dumped yet (and this
* method does nothing). The handle if {@code obj} is an
* instance which has been dumped already.
*
* @throws IOException
* If an error occurs attempting to save {@code null} or
* a cyclic reference.
*/
private int dumpCycle(Object obj) throws IOException {
// If the object has been saved already, save its handle only
int handle = objectsWritten.get(obj);
if (handle != -1) {
writeCyclicReference(handle);
return handle;
}
return -1;
}
代码示例来源:origin: ibinti/bugvm
/**
* Dumps the parameter {@code obj} only if it is {@code null}
* or an object that has already been dumped previously.
*
* @param obj
* Object to check if an instance previously dumped by this
* stream.
* @return -1 if it is an instance which has not been dumped yet (and this
* method does nothing). The handle if {@code obj} is an
* instance which has been dumped already.
*
* @throws IOException
* If an error occurs attempting to save {@code null} or
* a cyclic reference.
*/
private int dumpCycle(Object obj) throws IOException {
// If the object has been saved already, save its handle only
int handle = objectsWritten.get(obj);
if (handle != -1) {
writeCyclicReference(handle);
return handle;
}
return -1;
}
代码示例来源:origin: FlexoVM/flexovm
/**
* Dumps the parameter {@code obj} only if it is {@code null}
* or an object that has already been dumped previously.
*
* @param obj
* Object to check if an instance previously dumped by this
* stream.
* @return -1 if it is an instance which has not been dumped yet (and this
* method does nothing). The handle if {@code obj} is an
* instance which has been dumped already.
*
* @throws IOException
* If an error occurs attempting to save {@code null} or
* a cyclic reference.
*/
private int dumpCycle(Object obj) throws IOException {
// If the object has been saved already, save its handle only
int handle = objectsWritten.get(obj);
if (handle != -1) {
writeCyclicReference(handle);
return handle;
}
return -1;
}
代码示例来源:origin: com.jtransc/jtransc-rt
/**
* Dumps the parameter {@code obj} only if it is {@code null}
* or an object that has already been dumped previously.
*
* @param obj
* Object to check if an instance previously dumped by this
* stream.
* @return -1 if it is an instance which has not been dumped yet (and this
* method does nothing). The handle if {@code obj} is an
* instance which has been dumped already.
*
* @throws IOException
* If an error occurs attempting to save {@code null} or
* a cyclic reference.
*/
private int dumpCycle(Object obj) throws IOException {
// If the object has been saved already, save its handle only
int handle = objectsWritten.get(obj);
if (handle != -1) {
writeCyclicReference(handle);
return handle;
}
return -1;
}
代码示例来源:origin: MobiVM/robovm
/**
* Dumps the parameter {@code obj} only if it is {@code null}
* or an object that has already been dumped previously.
*
* @param obj
* Object to check if an instance previously dumped by this
* stream.
* @return -1 if it is an instance which has not been dumped yet (and this
* method does nothing). The handle if {@code obj} is an
* instance which has been dumped already.
*
* @throws IOException
* If an error occurs attempting to save {@code null} or
* a cyclic reference.
*/
private int dumpCycle(Object obj) throws IOException {
// If the object has been saved already, save its handle only
int handle = objectsWritten.get(obj);
if (handle != -1) {
writeCyclicReference(handle);
return handle;
}
return -1;
}
代码示例来源:origin: com.mobidevelop.robovm/robovm-rt
/**
* Dumps the parameter {@code obj} only if it is {@code null}
* or an object that has already been dumped previously.
*
* @param obj
* Object to check if an instance previously dumped by this
* stream.
* @return -1 if it is an instance which has not been dumped yet (and this
* method does nothing). The handle if {@code obj} is an
* instance which has been dumped already.
*
* @throws IOException
* If an error occurs attempting to save {@code null} or
* a cyclic reference.
*/
private int dumpCycle(Object obj) throws IOException {
// If the object has been saved already, save its handle only
int handle = objectsWritten.get(obj);
if (handle != -1) {
writeCyclicReference(handle);
return handle;
}
return -1;
}
代码示例来源:origin: com.bugvm/bugvm-rt
/**
* Dumps the parameter {@code obj} only if it is {@code null}
* or an object that has already been dumped previously.
*
* @param obj
* Object to check if an instance previously dumped by this
* stream.
* @return -1 if it is an instance which has not been dumped yet (and this
* method does nothing). The handle if {@code obj} is an
* instance which has been dumped already.
*
* @throws IOException
* If an error occurs attempting to save {@code null} or
* a cyclic reference.
*/
private int dumpCycle(Object obj) throws IOException {
// If the object has been saved already, save its handle only
int handle = objectsWritten.get(obj);
if (handle != -1) {
writeCyclicReference(handle);
return handle;
}
return -1;
}
代码示例来源:origin: com.gluonhq/robovm-rt
/**
* Dumps the parameter {@code obj} only if it is {@code null}
* or an object that has already been dumped previously.
*
* @param obj
* Object to check if an instance previously dumped by this
* stream.
* @return -1 if it is an instance which has not been dumped yet (and this
* method does nothing). The handle if {@code obj} is an
* instance which has been dumped already.
*
* @throws IOException
* If an error occurs attempting to save {@code null} or
* a cyclic reference.
*/
private int dumpCycle(Object obj) throws IOException {
// If the object has been saved already, save its handle only
int handle = objectsWritten.get(obj);
if (handle != -1) {
writeCyclicReference(handle);
return handle;
}
return -1;
}
内容来源于网络,如有侵权,请联系作者删除!