You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by ac...@apache.org on 2007/12/05 18:37:41 UTC

svn commit: r601439 - /xmlgraphics/fop/trunk/src/java/org/apache/fop/render/afp/modca/MapPageOverlay.java

Author: acumiskey
Date: Wed Dec  5 09:37:40 2007
New Revision: 601439

URL: http://svn.apache.org/viewvc?rev=601439&view=rev
Log:
Checkstyle fixes

Modified:
    xmlgraphics/fop/trunk/src/java/org/apache/fop/render/afp/modca/MapPageOverlay.java

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/afp/modca/MapPageOverlay.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/afp/modca/MapPageOverlay.java?rev=601439&r1=601438&r2=601439&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/afp/modca/MapPageOverlay.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/afp/modca/MapPageOverlay.java Wed Dec  5 09:37:40 2007
@@ -22,7 +22,7 @@
 import java.io.IOException;
 import java.io.OutputStream;
 import java.io.UnsupportedEncodingException;
-import java.util.ArrayList;
+import java.util.List;
 
 import org.apache.fop.render.afp.tools.BinaryUtils;
 
@@ -37,7 +37,7 @@
     /**
      * The collection of overlays (maximum of 254 stored as byte[])
      */
-    private ArrayList _overLays = new ArrayList();
+    private List overLays = new java.util.ArrayList();
 
     /**
      * Constructor for the Map Page Overlay
@@ -51,10 +51,11 @@
      *
      * @param name
      *            The name of the overlay.
+     * @throws MaximumSizeExceededException if the maximum size is reached
      */
     public void addOverlay(String name) throws MaximumSizeExceededException {
 
-        if (_overLays.size() > 253) {
+        if (overLays.size() > 253) {
             throw new MaximumSizeExceededException();
         }
 
@@ -72,28 +73,22 @@
         try {
 
             data = name.getBytes(AFPConstants.EBCIDIC_ENCODING);
-            _overLays.add(data);
+            overLays.add(data);
 
         } catch (UnsupportedEncodingException usee) {
 
-            log
-                .error("addOverlay():: UnsupportedEncodingException translating the name "
+            log.error("addOverlay():: UnsupportedEncodingException translating the name "
                 + name);
-
         }
-
     }
 
     /**
      * Accessor method to write the AFP datastream for the Map Page Overlay
      * @param os The stream to write to
-     * @throws java.io.IOException
+     * @throws java.io.IOException if an I/O exception occurred
      */
-    public void writeDataStream(OutputStream os)
-        throws IOException {
-
-
-        int oLayCount = _overLays.size();
+    public void writeDataStream(OutputStream os) throws IOException {
+        int oLayCount = overLays.size();
         int recordlength = oLayCount * 18;
 
         byte[] data = new byte[recordlength + 9];
@@ -134,12 +129,10 @@
             data[++pos] = 0x00;
 
             //now add the name
-            byte[] name = (byte[]) _overLays.get(i);
+            byte[] name = (byte[]) overLays.get(i);
 
             for (int j = 0; j < name.length; j++) {
-
                 data[++pos] = name[j];
-
             }
 
             data[++pos] = 0x04; //Resource Local Identifier (RLI)
@@ -148,11 +141,7 @@
 
             //now add the unique id to the RLI
             data[++pos] = olayref;
-
         }
-
         os.write(data);
-
     }
-
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org