java.io.ObjectOutputStream.writeStreamHeader()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(7.1k)|赞(0)|评价(0)|浏览(118)

本文整理了Java中java.io.ObjectOutputStream.writeStreamHeader()方法的一些代码示例,展示了ObjectOutputStream.writeStreamHeader()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ObjectOutputStream.writeStreamHeader()方法的具体详情如下:
包路径:java.io.ObjectOutputStream
类名称:ObjectOutputStream
方法名:writeStreamHeader

ObjectOutputStream.writeStreamHeader介绍

[英]Writes the ObjectOutputStream header to the target stream.
[中]将ObjectOutputStream头写入目标流。

代码示例

代码示例来源:origin: robovm/robovm

/**
 * Constructs a new ObjectOutputStream that writes to the OutputStream
 * {@code output}.
 *
 * @param output
 *            the non-null OutputStream to filter writes on.
 *
 * @throws IOException
 *             if an error occurs while writing the object stream
 *             header
 */
public ObjectOutputStream(OutputStream output) throws IOException {
  this.output = (output instanceof DataOutputStream) ? (DataOutputStream) output
      : new DataOutputStream(output);
  this.enableReplace = false;
  this.protocolVersion = PROTOCOL_VERSION_2;
  this.subclassOverridingImplementation = false;
  resetState();
  this.nestedException = new StreamCorruptedException();
  // So write...() methods can be used by
  // subclasses during writeStreamHeader()
  primitiveTypes = this.output;
  // Has to be done here according to the specification
  writeStreamHeader();
  primitiveTypes = null;
}

代码示例来源:origin: com.akiban/akiban-persistit

@Override
  protected final void writeStreamHeader() throws IOException {
    if (_classDescriptor == null)
      super.writeStreamHeader();
  }
}

代码示例来源:origin: EngineHub/CommandHelper

@Override
protected void writeStreamHeader() throws IOException {
  super.writeStreamHeader();
  super.flush();
}

代码示例来源:origin: MobiVM/robovm

/**
 * Constructs a new ObjectOutputStream that writes to the OutputStream
 * {@code output}.
 *
 * @param output
 *            the non-null OutputStream to filter writes on.
 *
 * @throws IOException
 *             if an error occurs while writing the object stream
 *             header
 */
public ObjectOutputStream(OutputStream output) throws IOException {
  this.output = (output instanceof DataOutputStream) ? (DataOutputStream) output
      : new DataOutputStream(output);
  this.enableReplace = false;
  this.protocolVersion = PROTOCOL_VERSION_2;
  this.subclassOverridingImplementation = false;
  resetState();
  this.nestedException = new StreamCorruptedException();
  // So write...() methods can be used by
  // subclasses during writeStreamHeader()
  primitiveTypes = this.output;
  // Has to be done here according to the specification
  writeStreamHeader();
  primitiveTypes = null;
}

代码示例来源:origin: com.mobidevelop.robovm/robovm-rt

/**
 * Constructs a new ObjectOutputStream that writes to the OutputStream
 * {@code output}.
 *
 * @param output
 *            the non-null OutputStream to filter writes on.
 *
 * @throws IOException
 *             if an error occurs while writing the object stream
 *             header
 */
public ObjectOutputStream(OutputStream output) throws IOException {
  this.output = (output instanceof DataOutputStream) ? (DataOutputStream) output
      : new DataOutputStream(output);
  this.enableReplace = false;
  this.protocolVersion = PROTOCOL_VERSION_2;
  this.subclassOverridingImplementation = false;
  resetState();
  this.nestedException = new StreamCorruptedException();
  // So write...() methods can be used by
  // subclasses during writeStreamHeader()
  primitiveTypes = this.output;
  // Has to be done here according to the specification
  writeStreamHeader();
  primitiveTypes = null;
}

代码示例来源:origin: com.gluonhq/robovm-rt

/**
 * Constructs a new ObjectOutputStream that writes to the OutputStream
 * {@code output}.
 *
 * @param output
 *            the non-null OutputStream to filter writes on.
 *
 * @throws IOException
 *             if an error occurs while writing the object stream
 *             header
 */
public ObjectOutputStream(OutputStream output) throws IOException {
  this.output = (output instanceof DataOutputStream) ? (DataOutputStream) output
      : new DataOutputStream(output);
  this.enableReplace = false;
  this.protocolVersion = PROTOCOL_VERSION_2;
  this.subclassOverridingImplementation = false;
  resetState();
  this.nestedException = new StreamCorruptedException();
  // So write...() methods can be used by
  // subclasses during writeStreamHeader()
  primitiveTypes = this.output;
  // Has to be done here according to the specification
  writeStreamHeader();
  primitiveTypes = null;
}

代码示例来源:origin: ibinti/bugvm

/**
 * Constructs a new ObjectOutputStream that writes to the OutputStream
 * {@code output}.
 *
 * @param output
 *            the non-null OutputStream to filter writes on.
 *
 * @throws IOException
 *             if an error occurs while writing the object stream
 *             header
 */
public ObjectOutputStream(OutputStream output) throws IOException {
  this.output = (output instanceof DataOutputStream) ? (DataOutputStream) output
      : new DataOutputStream(output);
  this.enableReplace = false;
  this.protocolVersion = PROTOCOL_VERSION_2;
  this.subclassOverridingImplementation = false;
  resetState();
  this.nestedException = new StreamCorruptedException();
  // So write...() methods can be used by
  // subclasses during writeStreamHeader()
  primitiveTypes = this.output;
  // Has to be done here according to the specification
  writeStreamHeader();
  primitiveTypes = null;
}

代码示例来源:origin: com.bugvm/bugvm-rt

/**
 * Constructs a new ObjectOutputStream that writes to the OutputStream
 * {@code output}.
 *
 * @param output
 *            the non-null OutputStream to filter writes on.
 *
 * @throws IOException
 *             if an error occurs while writing the object stream
 *             header
 */
public ObjectOutputStream(OutputStream output) throws IOException {
  this.output = (output instanceof DataOutputStream) ? (DataOutputStream) output
      : new DataOutputStream(output);
  this.enableReplace = false;
  this.protocolVersion = PROTOCOL_VERSION_2;
  this.subclassOverridingImplementation = false;
  resetState();
  this.nestedException = new StreamCorruptedException();
  // So write...() methods can be used by
  // subclasses during writeStreamHeader()
  primitiveTypes = this.output;
  // Has to be done here according to the specification
  writeStreamHeader();
  primitiveTypes = null;
}

代码示例来源:origin: com.jtransc/jtransc-rt

/**
 * Constructs a new ObjectOutputStream that writes to the OutputStream
 * {@code output}.
 *
 * @param output
 *            the non-null OutputStream to filter writes on.
 *
 * @throws IOException
 *             if an error occurs while writing the object stream
 *             header
 */
public ObjectOutputStream(OutputStream output) throws IOException {
  this.output = (output instanceof DataOutputStream) ? (DataOutputStream) output
      : new DataOutputStream(output);
  this.enableReplace = false;
  this.protocolVersion = PROTOCOL_VERSION_2;
  this.subclassOverridingImplementation = false;
  resetState();
  this.nestedException = new StreamCorruptedException();
  // So write...() methods can be used by
  // subclasses during writeStreamHeader()
  primitiveTypes = this.output;
  // Has to be done here according to the specification
  writeStreamHeader();
  primitiveTypes = null;
}

代码示例来源:origin: FlexoVM/flexovm

/**
 * Constructs a new ObjectOutputStream that writes to the OutputStream
 * {@code output}.
 *
 * @param output
 *            the non-null OutputStream to filter writes on.
 *
 * @throws IOException
 *             if an error occurs while writing the object stream
 *             header
 */
public ObjectOutputStream(OutputStream output) throws IOException {
  this.output = (output instanceof DataOutputStream) ? (DataOutputStream) output
      : new DataOutputStream(output);
  this.enableReplace = false;
  this.protocolVersion = PROTOCOL_VERSION_2;
  this.subclassOverridingImplementation = false;
  resetState();
  this.nestedException = new StreamCorruptedException();
  // So write...() methods can be used by
  // subclasses during writeStreamHeader()
  primitiveTypes = this.output;
  // Has to be done here according to the specification
  writeStreamHeader();
  primitiveTypes = null;
}

代码示例来源:origin: org.apidesign.bck2brwsr/emul

subs = new ReplaceTable(10, (float) 3.00);
enableOverride = false;
writeStreamHeader();
bout.setBlockDataMode(true);
if (extendedDebugInfo) {

代码示例来源:origin: jtulach/bck2brwsr

subs = new ReplaceTable(10, (float) 3.00);
enableOverride = false;
writeStreamHeader();
bout.setBlockDataMode(true);
if (extendedDebugInfo) {

相关文章

ObjectOutputStream类方法