ch.qos.logback.core.net

## Class AutoFlushingObjectWriter

- java.lang.Object
- - ch.qos.logback.core.net.AutoFlushingObjectWriter

All Implemented Interfaces:
  ObjectWriter

    public class AutoFlushingObjectWriter
    extends Object
    implements ObjectWriter

Automatically flushes the underlying `ObjectOutputStream` immediately after calling it's `ObjectOutputStream.writeObject(Object)` method.

Author:
  Sebastian Gröbler

### Constructor Summary

Constructors
Constructor and Description
`AutoFlushingObjectWriter(ObjectOutputStream objectOutputStream, int resetFrequency)` Creates a new instance for the given `ObjectOutputStream`.

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `write(Object object)` Writes an object to an output.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### AutoFlushingObjectWriter

    public AutoFlushingObjectWriter(ObjectOutputStream objectOutputStream,
                                    int resetFrequency)

Creates a new instance for the given `ObjectOutputStream`.

Parameters:
  `objectOutputStream` - the stream to write to
  `resetFrequency` - the frequency with which the given stream will be automatically reset to prevent a memory leak

### Method Detail

#### write

    public void write(Object object)
               throws IOException

Description copied from interface: `ObjectWriter`
Writes an object to an output.

Specified by:
  `write` in interface `ObjectWriter`
Parameters:
  `object` - the `Object` to write
Throws:
  `IOException` - in case input/output fails, details are defined by the implementation