blob: 6c0e3098fc8729f8581f1286120b9ce034659ed8 [file] [log] [blame]
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) -->
<title>OutputStreamManager (Apache Log4j Core 2.23.1 API)</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="description" content="declaration: package: org.apache.logging.log4j.core.appender, class: OutputStreamManager">
<meta name="generator" content="javadoc/ClassWriterImpl">
<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../../../script-dir/jquery-ui.min.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../../../jquery-ui.overrides.css" title="Style">
<script type="text/javascript" src="../../../../../../script.js"></script>
<script type="text/javascript" src="../../../../../../script-dir/jquery-3.6.1.min.js"></script>
<script type="text/javascript" src="../../../../../../script-dir/jquery-ui.min.js"></script>
</head>
<body class="class-declaration-page">
<script type="text/javascript">var evenRowColor = "even-row-color";
var oddRowColor = "odd-row-color";
var tableTab = "table-tab";
var activeTableTab = "active-table-tab";
var pathtoroot = "../../../../../../";
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<div class="flex-box">
<header role="banner" class="flex-header">
<nav role="navigation">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="top-nav" id="navbar-top">
<div class="skip-nav"><a href="#skip-navbar-top" title="Skip navigation links">Skip navigation links</a></div>
<ul id="navbar-top-firstrow" class="nav-list" title="Navigation">
<li><a href="../../../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="nav-bar-cell1-rev">Class</li>
<li><a href="class-use/OutputStreamManager.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../../help-doc.html#class">Help</a></li>
</ul>
</div>
<div class="sub-nav">
<div>
<ul class="sub-nav-list">
<li>Summary:&nbsp;</li>
<li><a href="#nested-class-summary">Nested</a>&nbsp;|&nbsp;</li>
<li><a href="#field-summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor-summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method-summary">Method</a></li>
</ul>
<ul class="sub-nav-list">
<li>Detail:&nbsp;</li>
<li><a href="#field-detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor-detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method-detail">Method</a></li>
</ul>
</div>
<div class="nav-list-search"><label for="search-input">SEARCH:</label>
<input type="text" id="search-input" value="search" disabled="disabled">
<input type="reset" id="reset-button" value="reset" disabled="disabled">
</div>
</div>
<!-- ========= END OF TOP NAVBAR ========= -->
<span class="skip-nav" id="skip-navbar-top"></span></nav>
</header>
<div class="flex-content">
<main role="main">
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="sub-title"><span class="package-label-in-type">Package</span>&nbsp;<a href="package-summary.html">org.apache.logging.log4j.core.appender</a></div>
<h1 title="Class OutputStreamManager" class="title">Class OutputStreamManager</h1>
</div>
<div class="inheritance" title="Inheritance Tree"><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html" title="class or interface in java.lang" class="external-link">java.lang.Object</a>
<div class="inheritance"><a href="AbstractManager.html" title="class in org.apache.logging.log4j.core.appender">org.apache.logging.log4j.core.appender.AbstractManager</a>
<div class="inheritance">org.apache.logging.log4j.core.appender.OutputStreamManager</div>
</div>
</div>
<section class="class-description" id="class-description">
<dl class="notes">
<dt>All Implemented Interfaces:</dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/AutoCloseable.html" title="class or interface in java.lang" class="external-link">AutoCloseable</a></code>, <code><a href="../layout/ByteBufferDestination.html" title="interface in org.apache.logging.log4j.core.layout">ByteBufferDestination</a></code></dd>
</dl>
<dl class="notes">
<dt>Direct Known Subclasses:</dt>
<dd><code><a href="../net/AbstractSocketManager.html" title="class in org.apache.logging.log4j.core.net">AbstractSocketManager</a></code>, <code><a href="FileManager.html" title="class in org.apache.logging.log4j.core.appender">FileManager</a></code>, <code><a href="MemoryMappedFileManager.html" title="class in org.apache.logging.log4j.core.appender">MemoryMappedFileManager</a></code>, <code><a href="RandomAccessFileManager.html" title="class in org.apache.logging.log4j.core.appender">RandomAccessFileManager</a></code></dd>
</dl>
<hr>
<div class="type-signature"><span class="modifiers">public class </span><span class="element-name type-name-label">OutputStreamManager</span>
<span class="extends-implements">extends <a href="AbstractManager.html" title="class in org.apache.logging.log4j.core.appender">AbstractManager</a>
implements <a href="../layout/ByteBufferDestination.html" title="interface in org.apache.logging.log4j.core.layout">ByteBufferDestination</a></span></div>
<div class="block">Manages an OutputStream so that it can be shared by multiple Appenders and will
allow appenders to reconfigure without requiring a new stream.</div>
</section>
<section class="summary">
<ul class="summary-list">
<!-- ======== NESTED CLASS SUMMARY ======== -->
<li>
<section class="nested-class-summary" id="nested-class-summary">
<h2>Nested Class Summary</h2>
<div class="inherited-list">
<h2 id="nested-classes-inherited-from-class-org.apache.logging.log4j.core.appender.AbstractManager">Nested classes/interfaces inherited from class&nbsp;org.apache.logging.log4j.core.appender.<a href="AbstractManager.html" title="class in org.apache.logging.log4j.core.appender">AbstractManager</a></h2>
<code><a href="AbstractManager.AbstractFactoryData.html" title="class in org.apache.logging.log4j.core.appender">AbstractManager.AbstractFactoryData</a></code></div>
</section>
</li>
<!-- =========== FIELD SUMMARY =========== -->
<li>
<section class="field-summary" id="field-summary">
<h2>Field Summary</h2>
<div class="caption"><span>Fields</span></div>
<div class="summary-table three-column-summary">
<div class="table-header col-first">Modifier and Type</div>
<div class="table-header col-second">Field</div>
<div class="table-header col-last">Description</div>
<div class="col-first even-row-color"><code>protected <a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a></code></div>
<div class="col-second even-row-color"><code><a href="#byteBuffer" class="member-name-link">byteBuffer</a></code></div>
<div class="col-last even-row-color">&nbsp;</div>
<div class="col-first odd-row-color"><code>protected final <a href="../Layout.html" title="interface in org.apache.logging.log4j.core">Layout</a>&lt;?&gt;</code></div>
<div class="col-second odd-row-color"><code><a href="#layout" class="member-name-link">layout</a></code></div>
<div class="col-last odd-row-color">&nbsp;</div>
</div>
<div class="inherited-list">
<h3 id="fields-inherited-from-class-org.apache.logging.log4j.core.appender.AbstractManager">Fields inherited from class&nbsp;org.apache.logging.log4j.core.appender.<a href="AbstractManager.html" title="class in org.apache.logging.log4j.core.appender">AbstractManager</a></h3>
<code><a href="AbstractManager.html#count">count</a>, <a href="AbstractManager.html#LOGGER">LOGGER</a></code></div>
</section>
</li>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<li>
<section class="constructor-summary" id="constructor-summary">
<h2>Constructor Summary</h2>
<div class="caption"><span>Constructors</span></div>
<div class="summary-table three-column-summary">
<div class="table-header col-first">Modifier</div>
<div class="table-header col-second">Constructor</div>
<div class="table-header col-last">Description</div>
<div class="col-first even-row-color"><code>protected </code></div>
<div class="col-constructor-name even-row-color"><code><a href="#%3Cinit%3E(java.io.OutputStream,java.lang.String,org.apache.logging.log4j.core.Layout,boolean)" class="member-name-link">OutputStreamManager</a><wbr>(<a href="https://docs.oracle.com/javase/8/docs/api/java/io/OutputStream.html" title="class or interface in java.io" class="external-link">OutputStream</a>&nbsp;os,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;streamName,
<a href="../Layout.html" title="interface in org.apache.logging.log4j.core">Layout</a>&lt;?&gt;&nbsp;layout,
boolean&nbsp;writeHeader)</code></div>
<div class="col-last even-row-color">&nbsp;</div>
<div class="col-first odd-row-color"><code>protected </code></div>
<div class="col-constructor-name odd-row-color"><code><a href="#%3Cinit%3E(java.io.OutputStream,java.lang.String,org.apache.logging.log4j.core.Layout,boolean,int)" class="member-name-link">OutputStreamManager</a><wbr>(<a href="https://docs.oracle.com/javase/8/docs/api/java/io/OutputStream.html" title="class or interface in java.io" class="external-link">OutputStream</a>&nbsp;os,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;streamName,
<a href="../Layout.html" title="interface in org.apache.logging.log4j.core">Layout</a>&lt;?&gt;&nbsp;layout,
boolean&nbsp;writeHeader,
int&nbsp;bufferSize)</code></div>
<div class="col-last odd-row-color">&nbsp;</div>
<div class="col-first even-row-color"><code>protected </code></div>
<div class="col-constructor-name even-row-color"><code><a href="#%3Cinit%3E(java.io.OutputStream,java.lang.String,org.apache.logging.log4j.core.Layout,boolean,java.nio.ByteBuffer)" class="member-name-link">OutputStreamManager</a><wbr>(<a href="https://docs.oracle.com/javase/8/docs/api/java/io/OutputStream.html" title="class or interface in java.io" class="external-link">OutputStream</a>&nbsp;os,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;streamName,
<a href="../Layout.html" title="interface in org.apache.logging.log4j.core">Layout</a>&lt;?&gt;&nbsp;layout,
boolean&nbsp;writeHeader,
<a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;byteBuffer)</code></div>
<div class="col-last even-row-color">
<div class="block"><span class="deprecated-label">Deprecated.</span>&nbsp;</div>
</div>
<div class="col-first odd-row-color"><code>protected </code></div>
<div class="col-constructor-name odd-row-color"><code><a href="#%3Cinit%3E(org.apache.logging.log4j.core.LoggerContext,java.io.OutputStream,java.lang.String,boolean,org.apache.logging.log4j.core.Layout,boolean,java.nio.ByteBuffer)" class="member-name-link">OutputStreamManager</a><wbr>(<a href="../LoggerContext.html" title="class in org.apache.logging.log4j.core">LoggerContext</a>&nbsp;loggerContext,
<a href="https://docs.oracle.com/javase/8/docs/api/java/io/OutputStream.html" title="class or interface in java.io" class="external-link">OutputStream</a>&nbsp;os,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;streamName,
boolean&nbsp;createOnDemand,
<a href="../Layout.html" title="interface in org.apache.logging.log4j.core">Layout</a>&lt;? extends <a href="https://docs.oracle.com/javase/8/docs/api/java/io/Serializable.html" title="class or interface in java.io" class="external-link">Serializable</a>&gt;&nbsp;layout,
boolean&nbsp;writeHeader,
<a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;byteBuffer)</code></div>
<div class="col-last odd-row-color">&nbsp;</div>
</div>
</section>
</li>
<!-- ========== METHOD SUMMARY =========== -->
<li>
<section class="method-summary" id="method-summary">
<h2>Method Summary</h2>
<div id="method-summary-table">
<div class="table-tabs" role="tablist" aria-orientation="horizontal"><button id="method-summary-table-tab0" role="tab" aria-selected="true" aria-controls="method-summary-table.tabpanel" tabindex="0" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table', 3)" class="active-table-tab">All Methods</button><button id="method-summary-table-tab1" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab1', 3)" class="table-tab">Static Methods</button><button id="method-summary-table-tab2" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab2', 3)" class="table-tab">Instance Methods</button><button id="method-summary-table-tab4" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab4', 3)" class="table-tab">Concrete Methods</button></div>
<div id="method-summary-table.tabpanel" role="tabpanel">
<div class="summary-table three-column-summary" aria-labelledby="method-summary-table-tab0">
<div class="table-header col-first">Modifier and Type</div>
<div class="table-header col-second">Method</div>
<div class="table-header col-last">Description</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>protected boolean</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#closeOutputStream()" class="member-name-link">closeOutputStream</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">&nbsp;</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>protected <a href="https://docs.oracle.com/javase/8/docs/api/java/io/OutputStream.html" title="class or interface in java.io" class="external-link">OutputStream</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#createOutputStream()" class="member-name-link">createOutputStream</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">&nbsp;</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#drain(java.nio.ByteBuffer)" class="member-name-link">drain</a><wbr>(<a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;buf)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Drains the ByteBufferDestination's buffer into the destination.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#flush()" class="member-name-link">flush</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Flushes any buffers.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>protected void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#flushBuffer(java.nio.ByteBuffer)" class="member-name-link">flushBuffer</a><wbr>(<a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;buf)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Drains the ByteBufferDestination's buffer into the destination.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>protected void</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#flushDestination()" class="member-name-link">flushDestination</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Calls <code>flush()</code> on the underlying output stream.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getByteBuffer()" class="member-name-link">getByteBuffer</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Returns this <code>ByteBufferDestination</code>'s buffer.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static &lt;T&gt;&nbsp;<a href="OutputStreamManager.html" title="class in org.apache.logging.log4j.core.appender">OutputStreamManager</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#getManager(java.lang.String,T,org.apache.logging.log4j.core.appender.ManagerFactory)" class="member-name-link">getManager</a><wbr>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;name,
T&nbsp;data,
<a href="ManagerFactory.html" title="interface in org.apache.logging.log4j.core.appender">ManagerFactory</a>&lt;? extends <a href="OutputStreamManager.html" title="class in org.apache.logging.log4j.core.appender">OutputStreamManager</a>,<wbr>T&gt;&nbsp;factory)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Creates a Manager.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>protected <a href="https://docs.oracle.com/javase/8/docs/api/java/io/OutputStream.html" title="class or interface in java.io" class="external-link">OutputStream</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getOutputStream()" class="member-name-link">getOutputStream</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">&nbsp;</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>boolean</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#hasOutputStream()" class="member-name-link">hasOutputStream</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">&nbsp;</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>boolean</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#isOpen()" class="member-name-link">isOpen</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Returns the status of the stream.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>boolean</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#releaseSub(long,java.util.concurrent.TimeUnit)" class="member-name-link">releaseSub</a><wbr>(long&nbsp;timeout,
<a href="https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/TimeUnit.html" title="class or interface in java.util.concurrent" class="external-link">TimeUnit</a>&nbsp;timeUnit)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Default hook to write footer during close.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>protected void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#setOutputStream(java.io.OutputStream)" class="member-name-link">setOutputStream</a><wbr>(<a href="https://docs.oracle.com/javase/8/docs/api/java/io/OutputStream.html" title="class or interface in java.io" class="external-link">OutputStream</a>&nbsp;os)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">&nbsp;</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#skipFooter(boolean)" class="member-name-link">skipFooter</a><wbr>(boolean&nbsp;skipFooter)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Indicate whether the footer should be skipped or not.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>protected void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#write(byte%5B%5D)" class="member-name-link">write</a><wbr>(byte[]&nbsp;bytes)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Some output streams synchronize writes while others do not.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>protected void</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#write(byte%5B%5D,boolean)" class="member-name-link">write</a><wbr>(byte[]&nbsp;bytes,
boolean&nbsp;immediateFlush)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Some output streams synchronize writes while others do not.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>protected void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#write(byte%5B%5D,int,int)" class="member-name-link">write</a><wbr>(byte[]&nbsp;bytes,
int&nbsp;offset,
int&nbsp;length)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Some output streams synchronize writes while others do not.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>protected void</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#write(byte%5B%5D,int,int,boolean)" class="member-name-link">write</a><wbr>(byte[]&nbsp;bytes,
int&nbsp;offset,
int&nbsp;length,
boolean&nbsp;immediateFlush)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Some output streams synchronize writes while others do not.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#writeBytes(byte%5B%5D,int,int)" class="member-name-link">writeBytes</a><wbr>(byte[]&nbsp;data,
int&nbsp;offset,
int&nbsp;length)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Writes the given data to this ByteBufferDestination.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#writeBytes(java.nio.ByteBuffer)" class="member-name-link">writeBytes</a><wbr>(<a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;data)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Writes the given data to this ByteBufferDestination entirely.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>protected void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#writeFooter()" class="member-name-link">writeFooter</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Writes the footer.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>protected void</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#writeHeader(java.io.OutputStream)" class="member-name-link">writeHeader</a><wbr>(<a href="https://docs.oracle.com/javase/8/docs/api/java/io/OutputStream.html" title="class or interface in java.io" class="external-link">OutputStream</a>&nbsp;os)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">&nbsp;</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>protected void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#writeToDestination(byte%5B%5D,int,int)" class="member-name-link">writeToDestination</a><wbr>(byte[]&nbsp;bytes,
int&nbsp;offset,
int&nbsp;length)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Writes the specified section of the specified byte array to the stream.</div>
</div>
</div>
</div>
</div>
<div class="inherited-list">
<h3 id="methods-inherited-from-class-org.apache.logging.log4j.core.appender.AbstractManager">Methods inherited from class&nbsp;org.apache.logging.log4j.core.appender.<a href="AbstractManager.html" title="class in org.apache.logging.log4j.core.appender">AbstractManager</a></h3>
<code><a href="AbstractManager.html#close()">close</a>, <a href="AbstractManager.html#getContentFormat()">getContentFormat</a>, <a href="AbstractManager.html#getCount()">getCount</a>, <a href="AbstractManager.html#getLoggerContext()">getLoggerContext</a>, <a href="AbstractManager.html#getManager(java.lang.String,org.apache.logging.log4j.core.appender.ManagerFactory,T)">getManager</a>, <a href="AbstractManager.html#getName()">getName</a>, <a href="AbstractManager.html#getStrSubstitutor()">getStrSubstitutor</a>, <a href="AbstractManager.html#hasManager(java.lang.String)">hasManager</a>, <a href="AbstractManager.html#log(org.apache.logging.log4j.Level,java.lang.String,java.lang.Throwable)">log</a>, <a href="AbstractManager.html#logDebug(java.lang.String,java.lang.Throwable)">logDebug</a>, <a href="AbstractManager.html#logError(java.lang.String,java.lang.Throwable)">logError</a>, <a href="AbstractManager.html#logger()">logger</a>, <a href="AbstractManager.html#logWarn(java.lang.String,java.lang.Throwable)">logWarn</a>, <a href="AbstractManager.html#narrow(java.lang.Class,org.apache.logging.log4j.core.appender.AbstractManager)">narrow</a>, <a href="AbstractManager.html#release()">release</a>, <a href="AbstractManager.html#stop(long,java.util.concurrent.TimeUnit)">stop</a>, <a href="AbstractManager.html#updateData(java.lang.Object)">updateData</a></code></div>
<div class="inherited-list">
<h3 id="methods-inherited-from-class-java.lang.Object">Methods inherited from class&nbsp;java.lang.<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></h3>
<code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#clone--" title="class or interface in java.lang" class="external-link">clone</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#equals-java.lang.Object-" title="class or interface in java.lang" class="external-link">equals</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#finalize--" title="class or interface in java.lang" class="external-link">finalize</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#getClass--" title="class or interface in java.lang" class="external-link">getClass</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#hashCode--" title="class or interface in java.lang" class="external-link">hashCode</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notify--" title="class or interface in java.lang" class="external-link">notify</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notifyAll--" title="class or interface in java.lang" class="external-link">notifyAll</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#toString--" title="class or interface in java.lang" class="external-link">toString</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait--" title="class or interface in java.lang" class="external-link">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-" title="class or interface in java.lang" class="external-link">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-int-" title="class or interface in java.lang" class="external-link">wait</a></code></div>
</section>
</li>
</ul>
</section>
<section class="details">
<ul class="details-list">
<!-- ============ FIELD DETAIL =========== -->
<li>
<section class="field-details" id="field-detail">
<h2>Field Details</h2>
<ul class="member-list">
<li>
<section class="detail" id="layout">
<h3>layout</h3>
<div class="member-signature"><span class="modifiers">protected final</span>&nbsp;<span class="return-type"><a href="../Layout.html" title="interface in org.apache.logging.log4j.core">Layout</a>&lt;?&gt;</span>&nbsp;<span class="element-name">layout</span></div>
</section>
</li>
<li>
<section class="detail" id="byteBuffer">
<h3>byteBuffer</h3>
<div class="member-signature"><span class="modifiers">protected</span>&nbsp;<span class="return-type"><a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a></span>&nbsp;<span class="element-name">byteBuffer</span></div>
</section>
</li>
</ul>
</section>
</li>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<li>
<section class="constructor-details" id="constructor-detail">
<h2>Constructor Details</h2>
<ul class="member-list">
<li>
<section class="detail" id="&lt;init&gt;(java.io.OutputStream,java.lang.String,org.apache.logging.log4j.core.Layout,boolean)">
<h3>OutputStreamManager</h3>
<div class="member-signature"><span class="modifiers">protected</span>&nbsp;<span class="element-name">OutputStreamManager</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/javase/8/docs/api/java/io/OutputStream.html" title="class or interface in java.io" class="external-link">OutputStream</a>&nbsp;os,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;streamName,
<a href="../Layout.html" title="interface in org.apache.logging.log4j.core">Layout</a>&lt;?&gt;&nbsp;layout,
boolean&nbsp;writeHeader)</span></div>
</section>
</li>
<li>
<section class="detail" id="&lt;init&gt;(java.io.OutputStream,java.lang.String,org.apache.logging.log4j.core.Layout,boolean,int)">
<h3>OutputStreamManager</h3>
<div class="member-signature"><span class="modifiers">protected</span>&nbsp;<span class="element-name">OutputStreamManager</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/javase/8/docs/api/java/io/OutputStream.html" title="class or interface in java.io" class="external-link">OutputStream</a>&nbsp;os,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;streamName,
<a href="../Layout.html" title="interface in org.apache.logging.log4j.core">Layout</a>&lt;?&gt;&nbsp;layout,
boolean&nbsp;writeHeader,
int&nbsp;bufferSize)</span></div>
</section>
</li>
<li>
<section class="detail" id="&lt;init&gt;(java.io.OutputStream,java.lang.String,org.apache.logging.log4j.core.Layout,boolean,java.nio.ByteBuffer)">
<h3>OutputStreamManager</h3>
<div class="member-signature"><span class="annotations"><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Deprecated.html" title="class or interface in java.lang" class="external-link">@Deprecated</a>
</span><span class="modifiers">protected</span>&nbsp;<span class="element-name">OutputStreamManager</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/javase/8/docs/api/java/io/OutputStream.html" title="class or interface in java.io" class="external-link">OutputStream</a>&nbsp;os,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;streamName,
<a href="../Layout.html" title="interface in org.apache.logging.log4j.core">Layout</a>&lt;?&gt;&nbsp;layout,
boolean&nbsp;writeHeader,
<a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;byteBuffer)</span></div>
<div class="deprecation-block"><span class="deprecated-label">Deprecated.</span></div>
<dl class="notes">
<dt>Since:</dt>
<dd>2.6</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="&lt;init&gt;(org.apache.logging.log4j.core.LoggerContext,java.io.OutputStream,java.lang.String,boolean,org.apache.logging.log4j.core.Layout,boolean,java.nio.ByteBuffer)">
<h3>OutputStreamManager</h3>
<div class="member-signature"><span class="modifiers">protected</span>&nbsp;<span class="element-name">OutputStreamManager</span><wbr><span class="parameters">(<a href="../LoggerContext.html" title="class in org.apache.logging.log4j.core">LoggerContext</a>&nbsp;loggerContext,
<a href="https://docs.oracle.com/javase/8/docs/api/java/io/OutputStream.html" title="class or interface in java.io" class="external-link">OutputStream</a>&nbsp;os,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;streamName,
boolean&nbsp;createOnDemand,
<a href="../Layout.html" title="interface in org.apache.logging.log4j.core">Layout</a>&lt;? extends <a href="https://docs.oracle.com/javase/8/docs/api/java/io/Serializable.html" title="class or interface in java.io" class="external-link">Serializable</a>&gt;&nbsp;layout,
boolean&nbsp;writeHeader,
<a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;byteBuffer)</span></div>
<dl class="notes">
<dt>Since:</dt>
<dd>2.7</dd>
</dl>
</section>
</li>
</ul>
</section>
</li>
<!-- ============ METHOD DETAIL ========== -->
<li>
<section class="method-details" id="method-detail">
<h2>Method Details</h2>
<ul class="member-list">
<li>
<section class="detail" id="getManager(java.lang.String,T,org.apache.logging.log4j.core.appender.ManagerFactory)">
<h3 id="getManager(java.lang.String,java.lang.Object,org.apache.logging.log4j.core.appender.ManagerFactory)">getManager</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="type-parameters">&lt;T&gt;</span>&nbsp;<span class="return-type"><a href="OutputStreamManager.html" title="class in org.apache.logging.log4j.core.appender">OutputStreamManager</a></span>&nbsp;<span class="element-name">getManager</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;name,
T&nbsp;data,
<a href="ManagerFactory.html" title="interface in org.apache.logging.log4j.core.appender">ManagerFactory</a>&lt;? extends <a href="OutputStreamManager.html" title="class in org.apache.logging.log4j.core.appender">OutputStreamManager</a>,<wbr>T&gt;&nbsp;factory)</span></div>
<div class="block">Creates a Manager.</div>
<dl class="notes">
<dt>Type Parameters:</dt>
<dd><code>T</code> - The type of the OutputStreamManager.</dd>
<dt>Parameters:</dt>
<dd><code>name</code> - The name of the stream to manage.</dd>
<dd><code>data</code> - The data to pass to the Manager.</dd>
<dd><code>factory</code> - The factory to use to create the Manager.</dd>
<dt>Returns:</dt>
<dd>An OutputStreamManager.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="createOutputStream()">
<h3>createOutputStream</h3>
<div class="member-signature"><span class="modifiers">protected</span>&nbsp;<span class="return-type"><a href="https://docs.oracle.com/javase/8/docs/api/java/io/OutputStream.html" title="class or interface in java.io" class="external-link">OutputStream</a></span>&nbsp;<span class="element-name">createOutputStream</span>()
throws <span class="exceptions"><a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html" title="class or interface in java.io" class="external-link">IOException</a></span></div>
<dl class="notes">
<dt>Throws:</dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html" title="class or interface in java.io" class="external-link">IOException</a></code></dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="skipFooter(boolean)">
<h3>skipFooter</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">skipFooter</span><wbr><span class="parameters">(boolean&nbsp;skipFooter)</span></div>
<div class="block">Indicate whether the footer should be skipped or not.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>skipFooter</code> - true if the footer should be skipped.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="releaseSub(long,java.util.concurrent.TimeUnit)">
<h3>releaseSub</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name">releaseSub</span><wbr><span class="parameters">(long&nbsp;timeout,
<a href="https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/TimeUnit.html" title="class or interface in java.util.concurrent" class="external-link">TimeUnit</a>&nbsp;timeUnit)</span></div>
<div class="block">Default hook to write footer during close.</div>
<dl class="notes">
<dt>Overrides:</dt>
<dd><code><a href="AbstractManager.html#releaseSub(long,java.util.concurrent.TimeUnit)">releaseSub</a></code>&nbsp;in class&nbsp;<code><a href="AbstractManager.html" title="class in org.apache.logging.log4j.core.appender">AbstractManager</a></code></dd>
<dt>Parameters:</dt>
<dd><code>timeout</code> - timeout</dd>
<dd><code>timeUnit</code> - timeout time unit</dd>
<dt>Returns:</dt>
<dd>true if all resources were closed normally, false otherwise.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="writeHeader(java.io.OutputStream)">
<h3>writeHeader</h3>
<div class="member-signature"><span class="modifiers">protected</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">writeHeader</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/javase/8/docs/api/java/io/OutputStream.html" title="class or interface in java.io" class="external-link">OutputStream</a>&nbsp;os)</span></div>
</section>
</li>
<li>
<section class="detail" id="writeFooter()">
<h3>writeFooter</h3>
<div class="member-signature"><span class="modifiers">protected</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">writeFooter</span>()</div>
<div class="block">Writes the footer.</div>
</section>
</li>
<li>
<section class="detail" id="isOpen()">
<h3>isOpen</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name">isOpen</span>()</div>
<div class="block">Returns the status of the stream.</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>true if the stream is open, false if it is not.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="hasOutputStream()">
<h3>hasOutputStream</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name">hasOutputStream</span>()</div>
</section>
</li>
<li>
<section class="detail" id="getOutputStream()">
<h3>getOutputStream</h3>
<div class="member-signature"><span class="modifiers">protected</span>&nbsp;<span class="return-type"><a href="https://docs.oracle.com/javase/8/docs/api/java/io/OutputStream.html" title="class or interface in java.io" class="external-link">OutputStream</a></span>&nbsp;<span class="element-name">getOutputStream</span>()
throws <span class="exceptions"><a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html" title="class or interface in java.io" class="external-link">IOException</a></span></div>
<dl class="notes">
<dt>Throws:</dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html" title="class or interface in java.io" class="external-link">IOException</a></code></dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="setOutputStream(java.io.OutputStream)">
<h3>setOutputStream</h3>
<div class="member-signature"><span class="modifiers">protected</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">setOutputStream</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/javase/8/docs/api/java/io/OutputStream.html" title="class or interface in java.io" class="external-link">OutputStream</a>&nbsp;os)</span></div>
</section>
</li>
<li>
<section class="detail" id="write(byte[])">
<h3>write</h3>
<div class="member-signature"><span class="modifiers">protected</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">write</span><wbr><span class="parameters">(byte[]&nbsp;bytes)</span></div>
<div class="block">Some output streams synchronize writes while others do not.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>bytes</code> - The serialized Log event.</dd>
<dt>Throws:</dt>
<dd><code><a href="AppenderLoggingException.html" title="class in org.apache.logging.log4j.core.appender">AppenderLoggingException</a></code> - if an error occurs.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="write(byte[],boolean)">
<h3>write</h3>
<div class="member-signature"><span class="modifiers">protected</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">write</span><wbr><span class="parameters">(byte[]&nbsp;bytes,
boolean&nbsp;immediateFlush)</span></div>
<div class="block">Some output streams synchronize writes while others do not.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>bytes</code> - The serialized Log event.</dd>
<dd><code>immediateFlush</code> - If true, flushes after writing.</dd>
<dt>Throws:</dt>
<dd><code><a href="AppenderLoggingException.html" title="class in org.apache.logging.log4j.core.appender">AppenderLoggingException</a></code> - if an error occurs.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="writeBytes(byte[],int,int)">
<h3>writeBytes</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">writeBytes</span><wbr><span class="parameters">(byte[]&nbsp;data,
int&nbsp;offset,
int&nbsp;length)</span></div>
<div class="block"><span class="descfrm-type-label">Description copied from interface:&nbsp;<code><a href="../layout/ByteBufferDestination.html#writeBytes(byte%5B%5D,int,int)">ByteBufferDestination</a></code></span></div>
<div class="block">Writes the given data to this ByteBufferDestination. Call of this method should *not* be protected with
synchronized on this ByteBufferDestination instance. ByteBufferDestination implementations should
synchronize themselves inside this method, if needed.
<p>
This method should behave identically to <code>writeBytes(ByteBuffer.wrap(data, offset, length)</code>.
It is provided to allow callers not to generate extra garbage.
<p>
This method is called writeBytes() to avoid clashing with <a href="#write(byte%5B%5D,int,int)"><code>write(byte[], int, int)</code></a>,
which might be overridden in user-defined subclasses as protected, hence adding it to interface and requiring
the method to be public breaks source compatibility.</div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="../layout/ByteBufferDestination.html#writeBytes(byte%5B%5D,int,int)">writeBytes</a></code>&nbsp;in interface&nbsp;<code><a href="../layout/ByteBufferDestination.html" title="interface in org.apache.logging.log4j.core.layout">ByteBufferDestination</a></code></dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="write(byte[],int,int)">
<h3>write</h3>
<div class="member-signature"><span class="modifiers">protected</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">write</span><wbr><span class="parameters">(byte[]&nbsp;bytes,
int&nbsp;offset,
int&nbsp;length)</span></div>
<div class="block">Some output streams synchronize writes while others do not. Synchronizing here insures that
log events won't be intertwined.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>bytes</code> - The serialized Log event.</dd>
<dd><code>offset</code> - The offset into the byte array.</dd>
<dd><code>length</code> - The number of bytes to write.</dd>
<dt>Throws:</dt>
<dd><code><a href="AppenderLoggingException.html" title="class in org.apache.logging.log4j.core.appender">AppenderLoggingException</a></code> - if an error occurs.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="write(byte[],int,int,boolean)">
<h3>write</h3>
<div class="member-signature"><span class="modifiers">protected</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">write</span><wbr><span class="parameters">(byte[]&nbsp;bytes,
int&nbsp;offset,
int&nbsp;length,
boolean&nbsp;immediateFlush)</span></div>
<div class="block">Some output streams synchronize writes while others do not. Synchronizing here insures that
log events won't be intertwined.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>bytes</code> - The serialized Log event.</dd>
<dd><code>offset</code> - The offset into the byte array.</dd>
<dd><code>length</code> - The number of bytes to write.</dd>
<dd><code>immediateFlush</code> - flushes immediately after writing.</dd>
<dt>Throws:</dt>
<dd><code><a href="AppenderLoggingException.html" title="class in org.apache.logging.log4j.core.appender">AppenderLoggingException</a></code> - if an error occurs.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="writeToDestination(byte[],int,int)">
<h3>writeToDestination</h3>
<div class="member-signature"><span class="modifiers">protected</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">writeToDestination</span><wbr><span class="parameters">(byte[]&nbsp;bytes,
int&nbsp;offset,
int&nbsp;length)</span></div>
<div class="block">Writes the specified section of the specified byte array to the stream.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>bytes</code> - the array containing data</dd>
<dd><code>offset</code> - from where to write</dd>
<dd><code>length</code> - how many bytes to write</dd>
<dt>Since:</dt>
<dd>2.6</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="flushDestination()">
<h3>flushDestination</h3>
<div class="member-signature"><span class="modifiers">protected</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">flushDestination</span>()</div>
<div class="block">Calls <code>flush()</code> on the underlying output stream.</div>
<dl class="notes">
<dt>Since:</dt>
<dd>2.6</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="flushBuffer(java.nio.ByteBuffer)">
<h3>flushBuffer</h3>
<div class="member-signature"><span class="modifiers">protected</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">flushBuffer</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;buf)</span></div>
<div class="block">Drains the ByteBufferDestination's buffer into the destination. By default this calls
<a href="#write(byte%5B%5D,int,int,boolean)"><code>write(byte[], int, int, boolean)</code></a> with the buffer contents.
The underlying stream is not <a href="https://docs.oracle.com/javase/8/docs/api/java/io/OutputStream.html#flush--" title="class or interface in java.io" class="external-link">flushed</a>.</div>
<dl class="notes">
<dt>Since:</dt>
<dd>2.6</dd>
<dt>See Also:</dt>
<dd>
<ul class="see-list">
<li><a href="#flushDestination()"><code>flushDestination()</code></a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="flush()">
<h3>flush</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">flush</span>()</div>
<div class="block">Flushes any buffers.</div>
</section>
</li>
<li>
<section class="detail" id="closeOutputStream()">
<h3>closeOutputStream</h3>
<div class="member-signature"><span class="modifiers">protected</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name">closeOutputStream</span>()</div>
</section>
</li>
<li>
<section class="detail" id="getByteBuffer()">
<h3>getByteBuffer</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a></span>&nbsp;<span class="element-name">getByteBuffer</span>()</div>
<div class="block">Returns this <code>ByteBufferDestination</code>'s buffer.</div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="../layout/ByteBufferDestination.html#getByteBuffer()">getByteBuffer</a></code>&nbsp;in interface&nbsp;<code><a href="../layout/ByteBufferDestination.html" title="interface in org.apache.logging.log4j.core.layout">ByteBufferDestination</a></code></dd>
<dt>Returns:</dt>
<dd>the buffer</dd>
<dt>Since:</dt>
<dd>2.6</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="drain(java.nio.ByteBuffer)">
<h3>drain</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a></span>&nbsp;<span class="element-name">drain</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;buf)</span></div>
<div class="block">Drains the ByteBufferDestination's buffer into the destination. By default this calls
<a href="#flushBuffer(java.nio.ByteBuffer)"><code>flushBuffer(ByteBuffer)</code></a> with the specified buffer. Subclasses may override.
<p>
Do not call this method lightly! For some subclasses this is a very expensive operation. For example,
<a href="MemoryMappedFileManager.html" title="class in org.apache.logging.log4j.core.appender"><code>MemoryMappedFileManager</code></a> will assume this method was called because the end of the mapped region
was reached during a text encoding operation and will remap its
buffer.
</p><p>
To just flush the buffered contents to the underlying stream, call
<a href="#flushBuffer(java.nio.ByteBuffer)"><code>flushBuffer(ByteBuffer)</code></a> directly instead.
</p></div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="../layout/ByteBufferDestination.html#drain(java.nio.ByteBuffer)">drain</a></code>&nbsp;in interface&nbsp;<code><a href="../layout/ByteBufferDestination.html" title="interface in org.apache.logging.log4j.core.layout">ByteBufferDestination</a></code></dd>
<dt>Parameters:</dt>
<dd><code>buf</code> - the buffer whose contents to write the destination</dd>
<dt>Returns:</dt>
<dd>the specified buffer</dd>
<dt>Since:</dt>
<dd>2.6</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="writeBytes(java.nio.ByteBuffer)">
<h3>writeBytes</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">writeBytes</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;data)</span></div>
<div class="block"><span class="descfrm-type-label">Description copied from interface:&nbsp;<code><a href="../layout/ByteBufferDestination.html#writeBytes(java.nio.ByteBuffer)">ByteBufferDestination</a></code></span></div>
<div class="block">Writes the given data to this ByteBufferDestination entirely. Call of this method should *not* be protected
with synchronized on this ByteBufferDestination instance. ByteBufferDestination implementations should
synchronize themselves inside this method, if needed.</div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="../layout/ByteBufferDestination.html#writeBytes(java.nio.ByteBuffer)">writeBytes</a></code>&nbsp;in interface&nbsp;<code><a href="../layout/ByteBufferDestination.html" title="interface in org.apache.logging.log4j.core.layout">ByteBufferDestination</a></code></dd>
</dl>
</section>
</li>
</ul>
</section>
</li>
</ul>
</section>
<!-- ========= END OF CLASS DATA ========= -->
</main>
<footer role="contentinfo">
<hr>
<p class="legal-copy"><small><p align="center"> Copyright &copy; 1999-2024 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All Rights Reserved.<br/> Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation. </p></small></p>
</footer>
</div>
</div>
</body>
</html>