Code example for ObjectOutputStream

Methods: defaultWriteObjectwriteBooleanwriteObject

0
   * @throws java.io.IOException if errors occur while writing the stream. 
   */ 
  private void writeObject(final ObjectOutputStream out)
      throws IOException 
  { 
    out.defaultWriteObject();
 
    if (parentConfiguration instanceof HierarchicalConfiguration)
    { 
      final HierarchicalConfiguration parent = (HierarchicalConfiguration) parentConfiguration;
      if (parent.booterClass != null)
      { 
        out.writeBoolean(false);
      } 
      else 
      { 
        out.writeBoolean(true);
        out.writeObject(parentConfiguration);
      } 
    } 
    else if (parentConfiguration != null)
    { 
      out.writeBoolean(true);
      out.writeObject(parentConfiguration);
    } 
    else 
    { 
      out.writeBoolean(false);
    } 
Experience pair programming with AI  Get Codota for Java