本文整理了Java中java.io.ObjectInputStream.resetState()
方法的一些代码示例,展示了ObjectInputStream.resetState()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ObjectInputStream.resetState()
方法的具体详情如下:
包路径:java.io.ObjectInputStream
类名称:ObjectInputStream
方法名:resetState
[英]Reset the receiver. The collection of objects already read by the receiver is reset, and internal structures are also reset so that the receiver knows it is in a fresh clean state.
[中]重置接收器。接收器已经读取的对象集合被重置,内部结构也被重置,以便接收器知道它处于全新的干净状态。
代码示例来源:origin: robovm/robovm
/**
* Constructs a new ObjectInputStream that reads from the InputStream
* {@code input}.
*
* @param input
* the non-null source InputStream to filter reads on.
* @throws IOException
* if an error occurs while reading the stream header.
* @throws StreamCorruptedException
* if the source stream does not contain serialized objects that
* can be read.
*/
public ObjectInputStream(InputStream input) throws StreamCorruptedException, IOException {
this.input = (input instanceof DataInputStream)
? (DataInputStream) input : new DataInputStream(input);
primitiveTypes = new DataInputStream(this);
enableResolve = false;
this.subclassOverridingImplementation = false;
resetState();
nestedLevels = 0;
// So read...() methods can be used by
// subclasses during readStreamHeader()
primitiveData = this.input;
// Has to be done here according to the specification
readStreamHeader();
primitiveData = emptyStream;
}
代码示例来源:origin: robovm/robovm
return;
case TC_RESET:
resetState();
break;
default:
代码示例来源:origin: robovm/robovm
throw new WriteAbortedException("Read an exception", exc);
case TC_RESET:
resetState();
break;
case TC_ENDBLOCKDATA: // Can occur reading class annotation
代码示例来源:origin: robovm/robovm
throw new WriteAbortedException("Read an exception", exc);
case TC_RESET:
resetState();
return null;
default:
代码示例来源:origin: MobiVM/robovm
/**
* Constructs a new ObjectInputStream that reads from the InputStream
* {@code input}.
*
* @param input
* the non-null source InputStream to filter reads on.
* @throws IOException
* if an error occurs while reading the stream header.
* @throws StreamCorruptedException
* if the source stream does not contain serialized objects that
* can be read.
*/
public ObjectInputStream(InputStream input) throws StreamCorruptedException, IOException {
this.input = (input instanceof DataInputStream)
? (DataInputStream) input : new DataInputStream(input);
primitiveTypes = new DataInputStream(this);
enableResolve = false;
this.subclassOverridingImplementation = false;
resetState();
nestedLevels = 0;
// So read...() methods can be used by
// subclasses during readStreamHeader()
primitiveData = this.input;
// Has to be done here according to the specification
readStreamHeader();
primitiveData = emptyStream;
}
代码示例来源:origin: com.mobidevelop.robovm/robovm-rt
/**
* Constructs a new ObjectInputStream that reads from the InputStream
* {@code input}.
*
* @param input
* the non-null source InputStream to filter reads on.
* @throws IOException
* if an error occurs while reading the stream header.
* @throws StreamCorruptedException
* if the source stream does not contain serialized objects that
* can be read.
*/
public ObjectInputStream(InputStream input) throws StreamCorruptedException, IOException {
this.input = (input instanceof DataInputStream)
? (DataInputStream) input : new DataInputStream(input);
primitiveTypes = new DataInputStream(this);
enableResolve = false;
this.subclassOverridingImplementation = false;
resetState();
nestedLevels = 0;
// So read...() methods can be used by
// subclasses during readStreamHeader()
primitiveData = this.input;
// Has to be done here according to the specification
readStreamHeader();
primitiveData = emptyStream;
}
代码示例来源:origin: com.bugvm/bugvm-rt
/**
* Constructs a new ObjectInputStream that reads from the InputStream
* {@code input}.
*
* @param input
* the non-null source InputStream to filter reads on.
* @throws IOException
* if an error occurs while reading the stream header.
* @throws StreamCorruptedException
* if the source stream does not contain serialized objects that
* can be read.
*/
public ObjectInputStream(InputStream input) throws StreamCorruptedException, IOException {
this.input = (input instanceof DataInputStream)
? (DataInputStream) input : new DataInputStream(input);
primitiveTypes = new DataInputStream(this);
enableResolve = false;
this.subclassOverridingImplementation = false;
resetState();
nestedLevels = 0;
// So read...() methods can be used by
// subclasses during readStreamHeader()
primitiveData = this.input;
// Has to be done here according to the specification
readStreamHeader();
primitiveData = emptyStream;
}
代码示例来源:origin: com.jtransc/jtransc-rt
/**
* Constructs a new ObjectInputStream that reads from the InputStream
* {@code input}.
*
* @param input the non-null source InputStream to filter reads on.
* @throws IOException if an error occurs while reading the stream header.
* @throws StreamCorruptedException if the source stream does not contain serialized objects that
* can be read.
*/
public ObjectInputStream(InputStream input) throws StreamCorruptedException, IOException {
this.input = (input instanceof DataInputStream)
? (DataInputStream) input : new DataInputStream(input);
primitiveTypes = new DataInputStream(this);
enableResolve = false;
this.subclassOverridingImplementation = false;
resetState();
nestedLevels = 0;
// So read...() methods can be used by
// subclasses during readStreamHeader()
primitiveData = this.input;
// Has to be done here according to the specification
readStreamHeader();
primitiveData = emptyStream;
}
代码示例来源:origin: FlexoVM/flexovm
/**
* Constructs a new ObjectInputStream that reads from the InputStream
* {@code input}.
*
* @param input
* the non-null source InputStream to filter reads on.
* @throws IOException
* if an error occurs while reading the stream header.
* @throws StreamCorruptedException
* if the source stream does not contain serialized objects that
* can be read.
*/
public ObjectInputStream(InputStream input) throws StreamCorruptedException, IOException {
this.input = (input instanceof DataInputStream)
? (DataInputStream) input : new DataInputStream(input);
primitiveTypes = new DataInputStream(this);
enableResolve = false;
this.subclassOverridingImplementation = false;
resetState();
nestedLevels = 0;
// So read...() methods can be used by
// subclasses during readStreamHeader()
primitiveData = this.input;
// Has to be done here according to the specification
readStreamHeader();
primitiveData = emptyStream;
}
代码示例来源:origin: ibinti/bugvm
/**
* Constructs a new ObjectInputStream that reads from the InputStream
* {@code input}.
*
* @param input
* the non-null source InputStream to filter reads on.
* @throws IOException
* if an error occurs while reading the stream header.
* @throws StreamCorruptedException
* if the source stream does not contain serialized objects that
* can be read.
*/
public ObjectInputStream(InputStream input) throws StreamCorruptedException, IOException {
this.input = (input instanceof DataInputStream)
? (DataInputStream) input : new DataInputStream(input);
primitiveTypes = new DataInputStream(this);
enableResolve = false;
this.subclassOverridingImplementation = false;
resetState();
nestedLevels = 0;
// So read...() methods can be used by
// subclasses during readStreamHeader()
primitiveData = this.input;
// Has to be done here according to the specification
readStreamHeader();
primitiveData = emptyStream;
}
代码示例来源:origin: com.gluonhq/robovm-rt
/**
* Constructs a new ObjectInputStream that reads from the InputStream
* {@code input}.
*
* @param input
* the non-null source InputStream to filter reads on.
* @throws IOException
* if an error occurs while reading the stream header.
* @throws StreamCorruptedException
* if the source stream does not contain serialized objects that
* can be read.
*/
public ObjectInputStream(InputStream input) throws StreamCorruptedException, IOException {
this.input = (input instanceof DataInputStream)
? (DataInputStream) input : new DataInputStream(input);
primitiveTypes = new DataInputStream(this);
enableResolve = false;
this.subclassOverridingImplementation = false;
resetState();
nestedLevels = 0;
// So read...() methods can be used by
// subclasses during readStreamHeader()
primitiveData = this.input;
// Has to be done here according to the specification
readStreamHeader();
primitiveData = emptyStream;
}
代码示例来源:origin: ibinti/bugvm
return;
case TC_RESET:
resetState();
break;
default:
代码示例来源:origin: MobiVM/robovm
return;
case TC_RESET:
resetState();
break;
default:
代码示例来源:origin: com.gluonhq/robovm-rt
return;
case TC_RESET:
resetState();
break;
default:
代码示例来源:origin: com.jtransc/jtransc-rt
return;
case TC_RESET:
resetState();
break;
default:
代码示例来源:origin: FlexoVM/flexovm
return;
case TC_RESET:
resetState();
break;
default:
代码示例来源:origin: com.mobidevelop.robovm/robovm-rt
return;
case TC_RESET:
resetState();
break;
default:
代码示例来源:origin: com.bugvm/bugvm-rt
return;
case TC_RESET:
resetState();
break;
default:
代码示例来源:origin: MobiVM/robovm
throw new WriteAbortedException("Read an exception", exc);
case TC_RESET:
resetState();
return null;
default:
代码示例来源:origin: FlexoVM/flexovm
throw new WriteAbortedException("Read an exception", exc);
case TC_RESET:
resetState();
return null;
default:
内容来源于网络,如有侵权,请联系作者删除!