blob: c713170c74ee5d6ff331aa4067b0093ab53e4b5e [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_161) on Tue May 29 11:14:00 CEST 2018 -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>PrefixedStringCodecFactory (Apache MINA 2.0.18 API Documentation)</title>
<meta name="date" content="2018-05-29">
<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="PrefixedStringCodecFactory (Apache MINA 2.0.18 API Documentation)";
}
}
catch(err) {
}
//-->
var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":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";
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/PrefixedStringCodecFactory.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">
<li>Prev&nbsp;Class</li>
<li><a href="../../../../../../org/apache/mina/filter/codec/prefixedstring/PrefixedStringDecoder.html" title="class in org.apache.mina.filter.codec.prefixedstring"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../../index.html?org/apache/mina/filter/codec/prefixedstring/PrefixedStringCodecFactory.html" target="_top">Frames</a></li>
<li><a href="PrefixedStringCodecFactory.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../../allclasses-noframe.html">All&nbsp;Classes</a></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>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&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>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">org.apache.mina.filter.codec.prefixedstring</div>
<h2 title="Class PrefixedStringCodecFactory" class="title">Class PrefixedStringCodecFactory</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li>org.apache.mina.filter.codec.prefixedstring.PrefixedStringCodecFactory</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd><a href="../../../../../../org/apache/mina/filter/codec/ProtocolCodecFactory.html" title="interface in org.apache.mina.filter.codec">ProtocolCodecFactory</a></dd>
</dl>
<hr>
<br>
<pre>public class <span class="typeNameLabel">PrefixedStringCodecFactory</span>
extends <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>
implements <a href="../../../../../../org/apache/mina/filter/codec/ProtocolCodecFactory.html" title="interface in org.apache.mina.filter.codec">ProtocolCodecFactory</a></pre>
<div class="block">A <a href="../../../../../../org/apache/mina/filter/codec/ProtocolCodecFactory.html" title="interface in org.apache.mina.filter.codec"><code>ProtocolCodecFactory</code></a> that performs encoding and decoding
of a Java String object using a fixed-length length prefix.</div>
<dl>
<dt><span class="simpleTagLabel">Author:</span></dt>
<dd><a href="http://mina.apache.org">Apache MINA Project</a></dd>
</dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../../org/apache/mina/filter/codec/prefixedstring/PrefixedStringCodecFactory.html#PrefixedStringCodecFactory--">PrefixedStringCodecFactory</a></span>()</code>
<div class="block">Creates a new PrefixedStringCodecFactory instance</div>
</td>
</tr>
<tr class="rowColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../../org/apache/mina/filter/codec/prefixedstring/PrefixedStringCodecFactory.html#PrefixedStringCodecFactory-java.nio.charset.Charset-">PrefixedStringCodecFactory</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a>&nbsp;charset)</code>
<div class="block">Creates a new PrefixedStringCodecFactory instance</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<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="colLast" scope="col">Method and Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code><a href="../../../../../../org/apache/mina/filter/codec/ProtocolDecoder.html" title="interface in org.apache.mina.filter.codec">ProtocolDecoder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/mina/filter/codec/prefixedstring/PrefixedStringCodecFactory.html#getDecoder-org.apache.mina.core.session.IoSession-">getDecoder</a></span>(<a href="../../../../../../org/apache/mina/core/session/IoSession.html" title="interface in org.apache.mina.core.session">IoSession</a>&nbsp;session)</code>
<div class="block">Returns a new (or reusable) instance of <a href="../../../../../../org/apache/mina/filter/codec/ProtocolDecoder.html" title="interface in org.apache.mina.filter.codec"><code>ProtocolDecoder</code></a> which
decodes binary or protocol-specific data into message objects.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/mina/filter/codec/prefixedstring/PrefixedStringCodecFactory.html#getDecoderMaxDataLength--">getDecoderMaxDataLength</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/mina/filter/codec/prefixedstring/PrefixedStringCodecFactory.html#getDecoderPrefixLength--">getDecoderPrefixLength</a></span>()</code>
<div class="block">Gets the length of the length prefix (1, 2, or 4) used by the decoder</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code><a href="../../../../../../org/apache/mina/filter/codec/ProtocolEncoder.html" title="interface in org.apache.mina.filter.codec">ProtocolEncoder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/mina/filter/codec/prefixedstring/PrefixedStringCodecFactory.html#getEncoder-org.apache.mina.core.session.IoSession-">getEncoder</a></span>(<a href="../../../../../../org/apache/mina/core/session/IoSession.html" title="interface in org.apache.mina.core.session">IoSession</a>&nbsp;session)</code>
<div class="block">Returns a new (or reusable) instance of <a href="../../../../../../org/apache/mina/filter/codec/ProtocolEncoder.html" title="interface in org.apache.mina.filter.codec"><code>ProtocolEncoder</code></a> which
encodes message objects into binary or protocol-specific data.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/mina/filter/codec/prefixedstring/PrefixedStringCodecFactory.html#getEncoderMaxDataLength--">getEncoderMaxDataLength</a></span>()</code>
<div class="block">Returns the allowed maximum size of an encoded string.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/mina/filter/codec/prefixedstring/PrefixedStringCodecFactory.html#getEncoderPrefixLength--">getEncoderPrefixLength</a></span>()</code>
<div class="block">Gets the length of the length prefix (1, 2, or 4) used by the encoder</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/mina/filter/codec/prefixedstring/PrefixedStringCodecFactory.html#setDecoderMaxDataLength-int-">setDecoderMaxDataLength</a></span>(int&nbsp;maxDataLength)</code>
<div class="block">Sets the maximum allowed value specified as data length in the decoded data
Useful for preventing an OutOfMemory attack by the peer.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/mina/filter/codec/prefixedstring/PrefixedStringCodecFactory.html#setDecoderPrefixLength-int-">setDecoderPrefixLength</a></span>(int&nbsp;prefixLength)</code>
<div class="block">Sets the length of the prefix used by the decoder</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/mina/filter/codec/prefixedstring/PrefixedStringCodecFactory.html#setEncoderMaxDataLength-int-">setEncoderMaxDataLength</a></span>(int&nbsp;maxDataLength)</code>
<div class="block">Sets the allowed maximum size of an encoded String.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/mina/filter/codec/prefixedstring/PrefixedStringCodecFactory.html#setEncoderPrefixLength-int-">setEncoderPrefixLength</a></span>(int&nbsp;prefixLength)</code>
<div class="block">Sets the length of the prefix used by the encoder</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3>
<code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a name="PrefixedStringCodecFactory-java.nio.charset.Charset-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>PrefixedStringCodecFactory</h4>
<pre>public&nbsp;PrefixedStringCodecFactory(<a href="http://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a>&nbsp;charset)</pre>
<div class="block">Creates a new PrefixedStringCodecFactory instance</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>charset</code> - The <a href="http://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset"><code>Charset</code></a> to use for encoding or decoding</dd>
</dl>
</li>
</ul>
<a name="PrefixedStringCodecFactory--">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>PrefixedStringCodecFactory</h4>
<pre>public&nbsp;PrefixedStringCodecFactory()</pre>
<div class="block">Creates a new PrefixedStringCodecFactory instance</div>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="getEncoderMaxDataLength--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getEncoderMaxDataLength</h4>
<pre>public&nbsp;int&nbsp;getEncoderMaxDataLength()</pre>
<div class="block">Returns the allowed maximum size of an encoded string.
If the size of the encoded String exceeds this value, the encoder
will throw a <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang"><code>IllegalArgumentException</code></a>.
The default value is <a href="../../../../../../org/apache/mina/filter/codec/prefixedstring/PrefixedStringEncoder.html#DEFAULT_MAX_DATA_LENGTH"><code>PrefixedStringEncoder.DEFAULT_MAX_DATA_LENGTH</code></a>.
<p>
This method does the same job as <a href="../../../../../../org/apache/mina/filter/codec/prefixedstring/PrefixedStringEncoder.html#setMaxDataLength-int-"><code>PrefixedStringEncoder.setMaxDataLength(int)</code></a>.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the allowed maximum size of an encoded string.</dd>
</dl>
</li>
</ul>
<a name="setEncoderMaxDataLength-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setEncoderMaxDataLength</h4>
<pre>public&nbsp;void&nbsp;setEncoderMaxDataLength(int&nbsp;maxDataLength)</pre>
<div class="block">Sets the allowed maximum size of an encoded String.
If the size of the encoded String exceeds this value, the encoder
will throw a <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang"><code>IllegalArgumentException</code></a>.
The default value is <a href="../../../../../../org/apache/mina/filter/codec/prefixedstring/PrefixedStringEncoder.html#DEFAULT_MAX_DATA_LENGTH"><code>PrefixedStringEncoder.DEFAULT_MAX_DATA_LENGTH</code></a>.
<p>
This method does the same job as <a href="../../../../../../org/apache/mina/filter/codec/prefixedstring/PrefixedStringEncoder.html#getMaxDataLength--"><code>PrefixedStringEncoder.getMaxDataLength()</code></a>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>maxDataLength</code> - allowed maximum size of an encoded String.</dd>
</dl>
</li>
</ul>
<a name="getDecoderMaxDataLength--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getDecoderMaxDataLength</h4>
<pre>public&nbsp;int&nbsp;getDecoderMaxDataLength()</pre>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the allowed maximum size of a decoded string.
<p>
This method does the same job as <a href="../../../../../../org/apache/mina/filter/codec/prefixedstring/PrefixedStringEncoder.html#setMaxDataLength-int-"><code>PrefixedStringEncoder.setMaxDataLength(int)</code></a>.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../org/apache/mina/filter/codec/prefixedstring/PrefixedStringCodecFactory.html#setDecoderMaxDataLength-int-"><code>setDecoderMaxDataLength(int)</code></a></dd>
</dl>
</li>
</ul>
<a name="setDecoderMaxDataLength-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setDecoderMaxDataLength</h4>
<pre>public&nbsp;void&nbsp;setDecoderMaxDataLength(int&nbsp;maxDataLength)</pre>
<div class="block">Sets the maximum allowed value specified as data length in the decoded data
<p>
Useful for preventing an OutOfMemory attack by the peer.
The decoder will throw a <a href="../../../../../../org/apache/mina/core/buffer/BufferDataException.html" title="class in org.apache.mina.core.buffer"><code>BufferDataException</code></a> when data length
specified in the incoming data is greater than maxDataLength
The default value is <a href="../../../../../../org/apache/mina/filter/codec/prefixedstring/PrefixedStringDecoder.html#DEFAULT_MAX_DATA_LENGTH"><code>PrefixedStringDecoder.DEFAULT_MAX_DATA_LENGTH</code></a>.
<p>
This method does the same job as <a href="../../../../../../org/apache/mina/filter/codec/prefixedstring/PrefixedStringDecoder.html#setMaxDataLength-int-"><code>PrefixedStringDecoder.setMaxDataLength(int)</code></a>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>maxDataLength</code> - maximum allowed value specified as data length in the incoming data</dd>
</dl>
</li>
</ul>
<a name="setDecoderPrefixLength-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setDecoderPrefixLength</h4>
<pre>public&nbsp;void&nbsp;setDecoderPrefixLength(int&nbsp;prefixLength)</pre>
<div class="block">Sets the length of the prefix used by the decoder</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>prefixLength</code> - the length of the length prefix (1, 2, or 4)</dd>
</dl>
</li>
</ul>
<a name="getDecoderPrefixLength--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getDecoderPrefixLength</h4>
<pre>public&nbsp;int&nbsp;getDecoderPrefixLength()</pre>
<div class="block">Gets the length of the length prefix (1, 2, or 4) used by the decoder</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>length of the length prefix</dd>
</dl>
</li>
</ul>
<a name="setEncoderPrefixLength-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setEncoderPrefixLength</h4>
<pre>public&nbsp;void&nbsp;setEncoderPrefixLength(int&nbsp;prefixLength)</pre>
<div class="block">Sets the length of the prefix used by the encoder</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>prefixLength</code> - the length of the length prefix (1, 2, or 4)</dd>
</dl>
</li>
</ul>
<a name="getEncoderPrefixLength--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getEncoderPrefixLength</h4>
<pre>public&nbsp;int&nbsp;getEncoderPrefixLength()</pre>
<div class="block">Gets the length of the length prefix (1, 2, or 4) used by the encoder</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>length of the length prefix</dd>
</dl>
</li>
</ul>
<a name="getEncoder-org.apache.mina.core.session.IoSession-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getEncoder</h4>
<pre>public&nbsp;<a href="../../../../../../org/apache/mina/filter/codec/ProtocolEncoder.html" title="interface in org.apache.mina.filter.codec">ProtocolEncoder</a>&nbsp;getEncoder(<a href="../../../../../../org/apache/mina/core/session/IoSession.html" title="interface in org.apache.mina.core.session">IoSession</a>&nbsp;session)
throws <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</a></pre>
<div class="block">Returns a new (or reusable) instance of <a href="../../../../../../org/apache/mina/filter/codec/ProtocolEncoder.html" title="interface in org.apache.mina.filter.codec"><code>ProtocolEncoder</code></a> which
encodes message objects into binary or protocol-specific data.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../../../org/apache/mina/filter/codec/ProtocolCodecFactory.html#getEncoder-org.apache.mina.core.session.IoSession-">getEncoder</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../../org/apache/mina/filter/codec/ProtocolCodecFactory.html" title="interface in org.apache.mina.filter.codec">ProtocolCodecFactory</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>session</code> - The current session</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The encoder instance</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</a></code> - If an error occurred while retrieving the encoder</dd>
</dl>
</li>
</ul>
<a name="getDecoder-org.apache.mina.core.session.IoSession-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>getDecoder</h4>
<pre>public&nbsp;<a href="../../../../../../org/apache/mina/filter/codec/ProtocolDecoder.html" title="interface in org.apache.mina.filter.codec">ProtocolDecoder</a>&nbsp;getDecoder(<a href="../../../../../../org/apache/mina/core/session/IoSession.html" title="interface in org.apache.mina.core.session">IoSession</a>&nbsp;session)
throws <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</a></pre>
<div class="block">Returns a new (or reusable) instance of <a href="../../../../../../org/apache/mina/filter/codec/ProtocolDecoder.html" title="interface in org.apache.mina.filter.codec"><code>ProtocolDecoder</code></a> which
decodes binary or protocol-specific data into message objects.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../../../org/apache/mina/filter/codec/ProtocolCodecFactory.html#getDecoder-org.apache.mina.core.session.IoSession-">getDecoder</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../../org/apache/mina/filter/codec/ProtocolCodecFactory.html" title="interface in org.apache.mina.filter.codec">ProtocolCodecFactory</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>session</code> - The current session</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The decoder instance</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</a></code> - If an error occurred while retrieving the decoder</dd>
</dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/PrefixedStringCodecFactory.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">
<li>Prev&nbsp;Class</li>
<li><a href="../../../../../../org/apache/mina/filter/codec/prefixedstring/PrefixedStringDecoder.html" title="class in org.apache.mina.filter.codec.prefixedstring"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../../index.html?org/apache/mina/filter/codec/prefixedstring/PrefixedStringCodecFactory.html" target="_top">Frames</a></li>
<li><a href="PrefixedStringCodecFactory.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../../allclasses-noframe.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>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&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>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>Copyright &#169; 2004&#x2013;2018 <a href="http://mina.apache.org/">Apache MINA Project</a>. All rights reserved.</small></p>
</body>
</html>