You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mina.apache.org by tr...@apache.org on 2007/11/02 01:58:17 UTC

svn commit: r591181 - /mina/trunk/core/src/main/java/org/apache/mina/filter/codec/textline/TextLineCodecFactory.java

Author: trustin
Date: Thu Nov  1 17:58:16 2007
New Revision: 591181

URL: http://svn.apache.org/viewvc?rev=591181&view=rev
Log:
Reformatted code

Modified:
    mina/trunk/core/src/main/java/org/apache/mina/filter/codec/textline/TextLineCodecFactory.java

Modified: mina/trunk/core/src/main/java/org/apache/mina/filter/codec/textline/TextLineCodecFactory.java
URL: http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/filter/codec/textline/TextLineCodecFactory.java?rev=591181&r1=591180&r2=591181&view=diff
==============================================================================
--- mina/trunk/core/src/main/java/org/apache/mina/filter/codec/textline/TextLineCodecFactory.java (original)
+++ mina/trunk/core/src/main/java/org/apache/mina/filter/codec/textline/TextLineCodecFactory.java Thu Nov  1 17:58:16 2007
@@ -19,7 +19,6 @@
  */
 package org.apache.mina.filter.codec.textline;
 
-
 import java.nio.charset.Charset;
 
 import org.apache.mina.common.BufferDataException;
@@ -27,7 +26,6 @@
 import org.apache.mina.filter.codec.ProtocolDecoder;
 import org.apache.mina.filter.codec.ProtocolEncoder;
 
-
 /**
  * A {@link ProtocolCodecFactory} that performs encoding and decoding between
  * a text line data and a Java string object.  This codec is useful especially
@@ -36,22 +34,18 @@
  * @author The Apache MINA Project (dev@mina.apache.org)
  * @version $Rev$, $Date$
  */
-public class TextLineCodecFactory implements ProtocolCodecFactory
-{
+public class TextLineCodecFactory implements ProtocolCodecFactory {
     private final TextLineEncoder encoder;
 
     private final TextLineDecoder decoder;
 
-
     /**
      * Creates a new instance with the current default {@link Charset}.
      */
-    public TextLineCodecFactory()
-    {
-        this( Charset.defaultCharset() );
+    public TextLineCodecFactory() {
+        this(Charset.defaultCharset());
     }
 
-
     /**
      * Creates a new instance with the specified {@link Charset}.  The
      * encoder uses a UNIX {@link LineDelimeter} and the decoder uses
@@ -60,13 +54,11 @@
      * @param charset
      *  The charset to use in the encoding and decoding
      */
-    public TextLineCodecFactory( Charset charset )
-    {
-        encoder = new TextLineEncoder( charset, LineDelimiter.UNIX );
-        decoder = new TextLineDecoder( charset, LineDelimiter.AUTO );
+    public TextLineCodecFactory(Charset charset) {
+        encoder = new TextLineEncoder(charset, LineDelimiter.UNIX);
+        decoder = new TextLineDecoder(charset, LineDelimiter.AUTO);
     }
 
-
     /**
      * Creates a new instance of TextLineCodecFactory.  This constructor
      * provides more flexibility for the developer.
@@ -78,25 +70,20 @@
      * @param decodingDelimiter
      *  The line delimeter for the decoder
      */
-    public TextLineCodecFactory( Charset charset, LineDelimiter encodingDelimiter, LineDelimiter decodingDelimiter )
-    {
-        encoder = new TextLineEncoder( charset, encodingDelimiter );
-        decoder = new TextLineDecoder( charset, decodingDelimiter );
+    public TextLineCodecFactory(Charset charset,
+            LineDelimiter encodingDelimiter, LineDelimiter decodingDelimiter) {
+        encoder = new TextLineEncoder(charset, encodingDelimiter);
+        decoder = new TextLineDecoder(charset, decodingDelimiter);
     }
 
-
-    public ProtocolEncoder getEncoder()
-    {
+    public ProtocolEncoder getEncoder() {
         return encoder;
     }
 
-
-    public ProtocolDecoder getDecoder()
-    {
+    public ProtocolDecoder getDecoder() {
         return decoder;
     }
 
-
     /**
      * Returns the allowed maximum size of the encoded line.
      * If the size of the encoded line exceeds this value, the encoder
@@ -105,12 +92,10 @@
      * <p>
      * This method does the same job with {@link TextLineEncoder#getMaxLineLength()}.
      */
-    public int getEncoderMaxLineLength()
-    {
+    public int getEncoderMaxLineLength() {
         return encoder.getMaxLineLength();
     }
 
-
     /**
      * Sets the allowed maximum size of the encoded line.
      * If the size of the encoded line exceeds this value, the encoder
@@ -119,12 +104,10 @@
      * <p>
      * This method does the same job with {@link TextLineEncoder#setMaxLineLength(int)}.
      */
-    public void setEncoderMaxLineLength( int maxLineLength )
-    {
-        encoder.setMaxLineLength( maxLineLength );
+    public void setEncoderMaxLineLength(int maxLineLength) {
+        encoder.setMaxLineLength(maxLineLength);
     }
 
-
     /**
      * Returns the allowed maximum size of the line to be decoded.
      * If the size of the line to be decoded exceeds this value, the
@@ -133,12 +116,10 @@
      * <p>
      * This method does the same job with {@link TextLineDecoder#getMaxLineLength()}.
      */
-    public int getDecoderMaxLineLength()
-    {
+    public int getDecoderMaxLineLength() {
         return decoder.getMaxLineLength();
     }
 
-
     /**
      * Sets the allowed maximum size of the line to be decoded.
      * If the size of the line to be decoded exceeds this value, the
@@ -147,8 +128,7 @@
      * <p>
      * This method does the same job with {@link TextLineDecoder#setMaxLineLength(int)}.
      */
-    public void setDecoderMaxLineLength( int maxLineLength )
-    {
-        decoder.setMaxLineLength( maxLineLength );
+    public void setDecoderMaxLineLength(int maxLineLength) {
+        decoder.setMaxLineLength(maxLineLength);
     }
 }