blob: b16eb27911cf3acb13a09f0a3f05ecd642fde79f [file] [log] [blame]
<!DOCTYPE HTML>
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (11.0.4) on Fri Sep 20 12:10:30 CEST 2019 -->
<title>LineAppender (Apache SIS 1.0 API)</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="dc.created" content="2019-09-20">
<meta name="keywords" content="org.apache.sis.io.LineAppender class">
<meta name="keywords" content="getMaximalLineLength()">
<meta name="keywords" content="setMaximalLineLength()">
<meta name="keywords" content="getTabulationWidth()">
<meta name="keywords" content="setTabulationWidth()">
<meta name="keywords" content="isTabulationExpanded()">
<meta name="keywords" content="setTabulationExpanded()">
<meta name="keywords" content="getLineSeparator()">
<meta name="keywords" content="setLineSeparator()">
<meta name="keywords" content="append()">
<meta name="keywords" content="clear()">
<meta name="keywords" content="flush()">
<meta name="keywords" content="onLineBegin()">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../sis.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../jquery/jquery-ui.css" title="Style">
<script type="text/javascript" src="../../../../script.js"></script>
<script type="text/javascript" src="../../../../jquery/jszip/dist/jszip.min.js"></script>
<script type="text/javascript" src="../../../../jquery/jszip-utils/dist/jszip-utils.min.js"></script>
<!--[if IE]>
<script type="text/javascript" src="../../../../jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script>
<![endif]-->
<script type="text/javascript" src="../../../../jquery/jquery-3.3.1.js"></script>
<script type="text/javascript" src="../../../../jquery/jquery-migrate-3.0.1.js"></script>
<script type="text/javascript" src="../../../../jquery/jquery-ui.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="LineAppender (Apache SIS 1.0 API)";
}
}
catch(err) {
}
//-->
var data = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
var pathtoroot = "../../../../";
var useModuleDirectories = false;
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<header role="banner">
<nav role="navigation">
<div class="fixedNav">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a id="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/LineAppender.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">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../allclasses.html">All&nbsp;Classes</a></li>
</ul>
<ul class="navListSearch">
<li><label for="search">SEARCH:</label>
<input type="text" id="search" value="search" disabled="disabled">
<input type="reset" id="reset" value="reset" disabled="disabled">
</li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&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="subNavList">
<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>
<a id="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
</div>
<div class="navPadding">&nbsp;</div>
<script type="text/javascript"><!--
$('.navPadding').css('padding-top', $('.fixedNav').css("height"));
//-->
</script>
</nav>
</header>
<!-- ======== START OF CLASS DATA ======== -->
<main role="main">
<div class="header">
<div class="subTitle"><span class="packageLabelInType">Package</span>&nbsp;<a href="package-summary.html">org.apache.sis.io</a></div>
<h2 title="Class LineAppender" class="title">Class LineAppender</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a></li>
<li>
<ul class="inheritance">
<li>LineAppender</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/io/Flushable.html?is-external=true" title="class or interface in java.io" class="externalLink">Flushable</a></code>, <code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Appendable.html?is-external=true" title="class or interface in java.lang" class="externalLink">Appendable</a></code></dd>
</dl>
<hr>
<pre>public class <span class="typeNameLabel">LineAppender</span>
extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a>
implements <a href="https://docs.oracle.com/javase/8/docs/api/java/io/Flushable.html?is-external=true" title="class or interface in java.io" class="externalLink">Flushable</a></pre>
<div class="block">An <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Appendable.html?is-external=true" title="class or interface in java.lang" class="externalLink"><code>Appendable</code></a> which can apply different kinds of reformatting that depend on the
<cite>End Of Line</cite> (EOL) occurrences. Available reformatting include inserting a
a margin before each line, wrapping to a maximal line length and replacing tabulations or
EOL characters. The actual work to be done can be enabled by invoking one or many of the
following methods:
<ul>
<li><a href="#setMaximalLineLength(int)"><code>set­Maximal­Line­Length(int)</code></a> for wrapping the lines to some maximal line length,
typically 80 Unicode characters (code points).</li>
<li><a href="#setTabulationExpanded(boolean)"><code>set­Tabulation­Expanded(boolean)</code></a> for replacing tabulation characters by spaces.</li>
<li><a href="#setLineSeparator(java.lang.String)"><code>set­Line­Separator(String)</code></a> for replacing all occurrences of
<a href="../util/Characters.html#isLineOrParagraphSeparator(int)">line separators</a> by the given string.</li>
</ul>
In addition this class removes trailing <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Character.html?is-external=true#isWhitespace(int)" title="class or interface in java.lang" class="externalLink">whitespaces</a>
before end of lines.
<div class="section">How line lengths are calculated</div>
Line length are measured in unit of Unicode <cite>code points</cite>. This is usually the same
than the number of <code>char</code> primitive values, but not always. Combining characters are not
yet recognized by this class, but future versions may improve on that.
<p>For proper line length calculation in presence of tabulation characters (<code>'\t'</code>),
this class needs to known the tabulation width. The default value is 8, but this can be changed
by a call to <a href="#setTabulationWidth(int)"><code>set­Tabulation­Width(int)</code></a>. Note that invoking that method affects only line
length calculation; it does not replace tabulations by spaces. For tabulation expansion, see
<a href="#setTabulationExpanded(boolean)"><code>set­Tabulation­Expanded(boolean)</code></a>.</p></div>
<dl>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>0.3</dd>
<p><font size="-1">Defined in the <code>sis-utility</code> module</font></p>
</dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- =========== FIELD SUMMARY =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="field.summary">
<!-- -->
</a>
<h3>Field Summary</h3>
<table class="memberSummary">
<caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Field</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Appendable.html?is-external=true" title="class or interface in java.lang" class="externalLink">Appendable</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#out">out</a></span></code></th>
<td class="colLast">
<div class="block">The underlying character output stream or buffer.</div>
</td>
</tr>
</table>
</li>
</ul>
</section>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="constructor.summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="memberSummary">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Constructor</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr class="altColor">
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E(java.lang.Appendable)">LineAppender</a></span>&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Appendable.html?is-external=true" title="class or interface in java.lang" class="externalLink">Appendable</a>&nbsp;out)</code></th>
<td class="colLast">
<div class="block">Constructs a default formatter.</div>
</td>
</tr>
<tr class="rowColor">
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E(java.lang.Appendable,int,boolean)">LineAppender</a></span>&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Appendable.html?is-external=true" title="class or interface in java.lang" class="externalLink">Appendable</a>&nbsp;out,
int&nbsp;maximalLineLength,
boolean&nbsp;isTabulationExpanded)</code></th>
<td class="colLast">
<div class="block">Constructs a formatter which will wrap the lines at a given maximal length.</div>
</td>
</tr>
<tr class="altColor">
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E(java.lang.Appendable,java.lang.String,boolean)">LineAppender</a></span>&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Appendable.html?is-external=true" title="class or interface in java.lang" class="externalLink">Appendable</a>&nbsp;out,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;lineSeparator,
boolean&nbsp;isTabulationExpanded)</code></th>
<td class="colLast">
<div class="block">Constructs a formatter which will replaces line separators by the given string.</div>
</td>
</tr>
</table>
</li>
</ul>
</section>
<!-- ========== METHOD SUMMARY =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Method</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Appendable.html?is-external=true" title="class or interface in java.lang" class="externalLink">Appendable</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#append(char)">append</a></span>&#8203;(char&nbsp;c)</code></th>
<td class="colLast">
<div class="block">Writes a single character.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Appendable.html?is-external=true" title="class or interface in java.lang" class="externalLink">Appendable</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#append(java.lang.CharSequence)">append</a></span>&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang" class="externalLink">CharSequence</a>&nbsp;sequence)</code></th>
<td class="colLast">
<div class="block">Appends the specified character sequence.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Appendable.html?is-external=true" title="class or interface in java.lang" class="externalLink">Appendable</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#append(java.lang.CharSequence,int,int)">append</a></span>&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang" class="externalLink">CharSequence</a>&nbsp;sequence,
int&nbsp;start,
int&nbsp;end)</code></th>
<td class="colLast">
<div class="block">Writes a portion of a character sequence.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#clear()">clear</a></span>()</code></th>
<td class="colLast">
<div class="block">Resets the <code>Line­Appender</code> internal state as if a new line was beginning.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#flush()">flush</a></span>()</code></th>
<td class="colLast">
<div class="block">Sends all pending characters to the underlying appendable, including trailing whitespaces.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getLineSeparator()">getLineSeparator</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns the line separator to be sent to the underlying appendable,
or <code>null</code> if EOL sequences are forwarded unchanged.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getMaximalLineLength()">getMaximalLineLength</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns the maximal line length, in unit of Unicode characters (code point count).</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getTabulationWidth()">getTabulationWidth</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns the current tabulation width, in unit of Unicode characters (code point count).</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isTabulationExpanded()">isTabulationExpanded</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns <code>true</code> if this formatter expands tabulations into spaces.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>protected void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#onLineBegin(boolean)">onLineBegin</a></span>&#8203;(boolean&nbsp;isContinuation)</code></th>
<td class="colLast">
<div class="block">Invoked when a new line is beginning.</div>
</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setLineSeparator(java.lang.String)">setLineSeparator</a></span>&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;lineSeparator)</code></th>
<td class="colLast">
<div class="block">Changes the line separator to be sent to the underlying appendable.</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setMaximalLineLength(int)">setMaximalLineLength</a></span>&#8203;(int&nbsp;length)</code></th>
<td class="colLast">
<div class="block">Sets the maximal line length, in units of Unicode characters (code point count).</div>
</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setTabulationExpanded(boolean)">setTabulationExpanded</a></span>&#8203;(boolean&nbsp;expanded)</code></th>
<td class="colLast">
<div class="block">Sets whether this class formatter expands tabulations into spaces.</div>
</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setTabulationWidth(int)">setTabulationWidth</a></span>&#8203;(int&nbsp;width)</code></th>
<td class="colLast">
<div class="block">Sets the tabulation width, in unit of Unicode characters (code point count).</div>
</td>
</tr>
<tr id="i14" class="altColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#toString()">toString</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns the content of this <code>Appendable</code> as a string if possible,
or the localized <cite>"Unavailable content"</cite> string otherwise.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a id="methods.inherited.from.class.Object">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a></h3>
<code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang" class="externalLink">clone</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang" class="externalLink">equals</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang" class="externalLink">finalize</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang" class="externalLink">get­Class</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang" class="externalLink">hash­Code</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang" class="externalLink">notify</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang" class="externalLink">notify­All</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang" class="externalLink">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang" class="externalLink">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait(long,int)" title="class or interface in java.lang" class="externalLink">wait</a></code></li>
</ul>
</li>
</ul>
</section>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ FIELD DETAIL =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="field.detail">
<!-- -->
</a>
<h3>Field Detail</h3>
<a id="out">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>out</h4>
<pre>protected final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Appendable.html?is-external=true" title="class or interface in java.lang" class="externalLink">Appendable</a> out</pre>
<div class="block">The underlying character output stream or buffer.</div>
</li>
</ul>
</li>
</ul>
</section>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="constructor.detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a id="&lt;init&gt;(java.lang.Appendable)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>LineAppender</h4>
<pre>public&nbsp;LineAppender&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Appendable.html?is-external=true" title="class or interface in java.lang" class="externalLink">Appendable</a>&nbsp;out)</pre>
<div class="block">Constructs a default formatter. Callers should invoke at least one of the following methods
after construction in order to perform useful work:
<ul>
<li><a href="#setMaximalLineLength(int)"><code>set­Maximal­Line­Length(int)</code></a></li>
<li><a href="#setTabulationExpanded(boolean)"><code>set­Tabulation­Expanded(boolean)</code></a></li>
<li><a href="#setLineSeparator(java.lang.String)"><code>set­Line­Separator(String)</code></a></li>
</ul></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>out</code> - the underlying stream or buffer to write to.</dd>
</dl>
</li>
</ul>
<a id="&lt;init&gt;(java.lang.Appendable,java.lang.String,boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>LineAppender</h4>
<pre>public&nbsp;LineAppender&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Appendable.html?is-external=true" title="class or interface in java.lang" class="externalLink">Appendable</a>&nbsp;out,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;lineSeparator,
boolean&nbsp;isTabulationExpanded)</pre>
<div class="block">Constructs a formatter which will replaces line separators by the given string.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>out</code> - the underlying stream or buffer to write to.</dd>
<dd><code>line­Separator</code> - the line separator to send to <code>out</code>, or <code>null</code>
for forwarding the EOL sequences unchanged.</dd>
<dd><code>is­Tabulation­Expanded</code> - <code>true</code> for expanding tabulations into spaces,
or <code>false</code> for sending <code>'\t'</code> characters as-is.</dd>
</dl>
</li>
</ul>
<a id="&lt;init&gt;(java.lang.Appendable,int,boolean)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>LineAppender</h4>
<pre>public&nbsp;LineAppender&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Appendable.html?is-external=true" title="class or interface in java.lang" class="externalLink">Appendable</a>&nbsp;out,
int&nbsp;maximalLineLength,
boolean&nbsp;isTabulationExpanded)</pre>
<div class="block">Constructs a formatter which will wrap the lines at a given maximal length.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>out</code> - the underlying stream or buffer to write to.</dd>
<dd><code>maximal­Line­Length</code> - the maximal number of Unicode characters per line,
or <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html?is-external=true#MAX_VALUE" title="class or interface in java.lang" class="externalLink"><code>Integer​.MAX_VALUE</code></a> if there is no limit.</dd>
<dd><code>is­Tabulation­Expanded</code> - <code>true</code> for expanding tabulations into spaces,
or <code>false</code> for forwarding <code>'\t'</code> characters as-is.</dd>
</dl>
</li>
</ul>
</li>
</ul>
</section>
<!-- ============ METHOD DETAIL ========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a id="getMaximalLineLength()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getMaximalLineLength</h4>
<pre class="methodSignature">public&nbsp;int&nbsp;getMaximalLineLength()</pre>
<div class="block">Returns the maximal line length, in unit of Unicode characters (code point count).
The default value is no limit.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the current maximal number of Unicode characters per line,
or <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html?is-external=true#MAX_VALUE" title="class or interface in java.lang" class="externalLink"><code>Integer​.MAX_VALUE</code></a> if there is no limit.</dd>
</dl>
</li>
</ul>
<a id="setMaximalLineLength(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setMaximalLineLength</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;setMaximalLineLength&#8203;(int&nbsp;length)</pre>
<div class="block">Sets the maximal line length, in units of Unicode characters (code point count).</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>length</code> - the new maximal number of Unicode characters per line,
or <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html?is-external=true#MAX_VALUE" title="class or interface in java.lang" class="externalLink"><code>Integer​.MAX_VALUE</code></a> if there is no limit.</dd>
</dl>
</li>
</ul>
<a id="getTabulationWidth()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getTabulationWidth</h4>
<pre class="methodSignature">public&nbsp;int&nbsp;getTabulationWidth()</pre>
<div class="block">Returns the current tabulation width, in unit of Unicode characters (code point count).
The default value is 8.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the current tabulation width in number of Unicode characters.</dd>
</dl>
</li>
</ul>
<a id="setTabulationWidth(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setTabulationWidth</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;setTabulationWidth&#8203;(int&nbsp;width)</pre>
<div class="block">Sets the tabulation width, in unit of Unicode characters (code point count).</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>width</code> - the new tabulation width. Must be greater than 0.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang" class="externalLink">Illegal­Argument­Exception</a></code> - if <code>tab­Width</code> is not greater than 0
or is unreasonably high.</dd>
</dl>
</li>
</ul>
<a id="isTabulationExpanded()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isTabulationExpanded</h4>
<pre class="methodSignature">public&nbsp;boolean&nbsp;isTabulationExpanded()</pre>
<div class="block">Returns <code>true</code> if this formatter expands tabulations into spaces.
The default value is <code>false</code>, which means that <code>'\t'</code> characters
are sent to the underlying appendable <i>as-is</i>.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><code>true</code> if this formatter expands tabulations into spaces,
or <code>false</code> if <code>'\t'</code> characters are forwarded <i>as-is</i>.</dd>
</dl>
</li>
</ul>
<a id="setTabulationExpanded(boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setTabulationExpanded</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;setTabulationExpanded&#8203;(boolean&nbsp;expanded)</pre>
<div class="block">Sets whether this class formatter expands tabulations into spaces.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>expanded</code> - <code>true</code> if this class shall expands tabulations into spaces,
or <code>false</code> for forwarding <code>'\t'</code> characters as-is.</dd>
</dl>
</li>
</ul>
<a id="getLineSeparator()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getLineSeparator</h4>
<pre class="methodSignature">public&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;getLineSeparator()</pre>
<div class="block">Returns the line separator to be sent to the underlying appendable,
or <code>null</code> if EOL sequences are forwarded unchanged.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the current line separator, or <code>null</code> if EOL are forwarded <i>as-is</i>.</dd>
</dl>
</li>
</ul>
<a id="setLineSeparator(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setLineSeparator</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;setLineSeparator&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;lineSeparator)</pre>
<div class="block">Changes the line separator to be sent to the underlying appendable.
This is the string to insert in place of every occurrences of <code>"\r"</code>, <code>"\n"</code>,
<code>"\r\n"</code> or other <a href="../util/Characters.html#isLineOrParagraphSeparator(int)">line separators</a>.
If <code>null</code> (the default), then the line separators given to the <code>append</code>
methods are forwarded unchanged.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>line­Separator</code> - the new line separator, or <code>null</code> for forwarding EOL <i>as-is</i>.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../util/Characters.html#isLineOrParagraphSeparator(int)"><code>Characters​.is­Line­Or­Paragraph­Separator(int)</code></a></dd>
</dl>
</li>
</ul>
<a id="append(char)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>append</h4>
<pre class="methodSignature">public&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Appendable.html?is-external=true" title="class or interface in java.lang" class="externalLink">Appendable</a>&nbsp;append&#8203;(char&nbsp;c)
throws <a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io" class="externalLink">IOException</a></pre>
<div class="block">Writes a single character.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Appendable.html?is-external=true#append(char)" title="class or interface in java.lang" class="externalLink">append</a></code>&nbsp;in interface&nbsp;<code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Appendable.html?is-external=true" title="class or interface in java.lang" class="externalLink">Appendable</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>c</code> - the character to append.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a reference to this <code>Appendable</code>.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io" class="externalLink">IOException</a></code> - if an I/O error occurs.</dd>
</dl>
</li>
</ul>
<a id="append(java.lang.CharSequence,int,int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>append</h4>
<pre class="methodSignature">public&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Appendable.html?is-external=true" title="class or interface in java.lang" class="externalLink">Appendable</a>&nbsp;append&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang" class="externalLink">CharSequence</a>&nbsp;sequence,
int&nbsp;start,
int&nbsp;end)
throws <a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io" class="externalLink">IOException</a></pre>
<div class="block">Writes a portion of a character sequence.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Appendable.html?is-external=true#append(java.lang.CharSequence,int,int)" title="class or interface in java.lang" class="externalLink">append</a></code>&nbsp;in interface&nbsp;<code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Appendable.html?is-external=true" title="class or interface in java.lang" class="externalLink">Appendable</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>sequence</code> - the character sequence to be written.</dd>
<dd><code>start</code> - index from which to start reading characters.</dd>
<dd><code>end</code> - index of the character following the last character to read.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a reference to this <code>Appendable</code>.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io" class="externalLink">IOException</a></code> - if an I/O error occurs.</dd>
</dl>
</li>
</ul>
<a id="clear()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>clear</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;clear()
throws <a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io" class="externalLink">IOException</a></pre>
<div class="block">Resets the <code>Line­Appender</code> internal state as if a new line was beginning.
Trailing whitespaces not yet sent to the <a href="#out">underlying appendable</a>
are discarded, and the column position (for tabulation expansion calculation) is
reset to 0. This method does not write any line separator.</div>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io" class="externalLink">IOException</a></code> - if an error occurred while sending the trailing non-white
characters to the underlying stream.</dd>
</dl>
</li>
</ul>
<a id="flush()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>flush</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;flush()
throws <a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io" class="externalLink">IOException</a></pre>
<div class="block">Sends all pending characters to the underlying appendable, including trailing whitespaces.
Note that this method should preferably be invoked at the end of a word, sentence or line,
since invoking this method may prevent <code>Line­Appender</code> to properly wrap the current
line if the current position is in the middle of a word.
<p>Invoking this method also flushes the underlying stream, if <a href="https://docs.oracle.com/javase/8/docs/api/java/io/Flushable.html?is-external=true" title="class or interface in java.io" class="externalLink">flushable</a>.
A cheaper way to send pending characters is to make sure that the last character is a
<a href="../util/Characters.html#isLineOrParagraphSeparator(int)">line or paragraph terminator</a>,
or to invoke <a href="#clear()"><code>clear()</code></a>.</p></div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/io/Flushable.html?is-external=true#flush()" title="class or interface in java.io" class="externalLink">flush</a></code>&nbsp;in interface&nbsp;<code><a href="https://docs.oracle.com/javase/8/docs/api/java/io/Flushable.html?is-external=true" title="class or interface in java.io" class="externalLink">Flushable</a></code></dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io" class="externalLink">IOException</a></code> - if an I/O error occurs.</dd>
</dl>
</li>
</ul>
<a id="onLineBegin(boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>onLineBegin</h4>
<pre class="methodSignature">protected&nbsp;void&nbsp;onLineBegin&#8203;(boolean&nbsp;isContinuation)
throws <a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io" class="externalLink">IOException</a></pre>
<div class="block">Invoked when a new line is beginning. The default implementation does nothing,
but subclasses can override this method for example in order to insert a margin
on the left side before each line.
<p>If an implementation wishes to write characters, it shall do so by writing
directly to <a href="#out"><code>out</code></a>, <strong>not</strong> by invoking the <code>append</code>
methods of this class.</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>is­Continuation</code> - <code>true</code> if the new line is the continuation of the previous
line after a "line wrap", or <code>false</code> if a line or paragraph separator has
been explicitly sent to this formatter.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io" class="externalLink">IOException</a></code> - if an error occurred while writing to <a href="#out"><code>out</code></a>.</dd>
</dl>
</li>
</ul>
<a id="append(java.lang.CharSequence)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>append</h4>
<pre class="methodSignature">public&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Appendable.html?is-external=true" title="class or interface in java.lang" class="externalLink">Appendable</a>&nbsp;append&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang" class="externalLink">CharSequence</a>&nbsp;sequence)
throws <a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io" class="externalLink">IOException</a></pre>
<div class="block">Appends the specified character sequence.
The default implementation delegates to <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Appendable.html?is-external=true#append(java.lang.CharSequence,int,int)" title="class or interface in java.lang" class="externalLink"><code>Appendable​.append(Char­Sequence, int, int)</code></a>.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Appendable.html?is-external=true#append(java.lang.CharSequence)" title="class or interface in java.lang" class="externalLink">append</a></code>&nbsp;in interface&nbsp;<code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Appendable.html?is-external=true" title="class or interface in java.lang" class="externalLink">Appendable</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>sequence</code> - the character sequence to append, or <code>null</code>.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a reference to this <code>Appendable</code>.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io" class="externalLink">IOException</a></code> - if an I/O error occurred.</dd>
</dl>
</li>
</ul>
<a id="toString()">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>toString</h4>
<pre class="methodSignature">public&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;toString()</pre>
<div class="block">Returns the content of this <code>Appendable</code> as a string if possible,
or the localized <cite>"Unavailable content"</cite> string otherwise.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang" class="externalLink">to­String</a></code>&nbsp;in class&nbsp;<code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the content of this <code>Appendable</code>, or a localized message for unavailable content.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="IO.html#content(java.lang.Appendable)"><code>IO​.content(Appendable)</code></a></dd>
</dl>
</li>
</ul>
</li>
</ul>
</section>
</li>
</ul>
</div>
</div>
</main>
<!-- ========= END OF CLASS DATA ========= -->
<footer role="contentinfo">
<nav role="navigation">
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a id="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/LineAppender.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">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../allclasses.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&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="subNavList">
<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>
<a id="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</nav>
<p class="legalCopy"><small>Copyright &#169; 2010&#x2013;2019 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
</footer>
</body>
</html>