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 je...@apache.org on 2005/11/14 13:56:54 UTC

svn commit: r344111 [2/2] - in /xmlgraphics/fop/trunk: ./ lib/ src/java/org/apache/fop/area/ src/java/org/apache/fop/fo/ src/java/org/apache/fop/fo/properties/ src/java/org/apache/fop/fonts/ src/java/org/apache/fop/fonts/truetype/ src/java/org/apache/f...

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java?rev=344111&r1=344110&r2=344111&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java Mon Nov 14 04:55:46 2005
@@ -432,10 +432,9 @@
             if (addedPositions == lineLayouts.getLineCount(activePossibility)) {
                 activePossibility++;
                 addedPositions = 0;
-                //System.out.println(" ");
             }
 
-            //System.out.println("LLM> (" + (lineLayouts.getLineNumber(activePossibility) - addedPositions) + ") difference = " + difference + " ratio = " + ratio);
+            //log.debug("LLM> (" + (lineLayouts.getLineNumber(activePossibility) - addedPositions) + ") difference = " + difference + " ratio = " + ratio);
             lineLayouts.addBreakPosition(makeLineBreakPosition(par,
                                                                (bestActiveNode.line > 1 ? bestActiveNode.previous.position + 1: 0),
                                                                bestActiveNode.position,
@@ -543,26 +542,26 @@
 
             if (pageAlignment == EN_JUSTIFY) {
                 // leave all active nodes and find the optimum line number
-                //System.out.println("LBA.filterActiveNodes> " + activeNodeCount + " layouts");
+                //log.debug("LBA.filterActiveNodes> " + activeNodeCount + " layouts");
                 for (int i = startLine; i < endLine; i++) {
                     for (KnuthNode node = getNode(i); node != null; node = node.next) {
-                        //System.out.println("                       + lines = " + node.line + " demerits = " + node.totalDemerits);
+                        //log.debug("                       + lines = " + node.line + " demerits = " + node.totalDemerits);
                         bestActiveNode = compareNodes(bestActiveNode, node);
                     }
                 }
 
                 // scan the node set once again and remove some nodes
-                //System.out.println("LBA.filterActiveList> layout selection");
+                //log.debug("LBA.filterActiveList> layout selection");
                 for (int i = startLine; i < endLine; i++) {
                     for (KnuthNode node = getNode(i); node != null; node = node.next) {
                         //if (Math.abs(node.line - bestActiveNode.line) > maxDiff) {
                         //if (false) {
                         if (node.line != bestActiveNode.line
                             && node.totalDemerits > MAX_DEMERITS) {
-                            //System.out.println("                     XXX lines = " + node.line + " demerits = " + node.totalDemerits);
+                            //log.debug("                     XXX lines = " + node.line + " demerits = " + node.totalDemerits);
                             removeNode(i, node);
                         } else {
-                            //System.out.println("                      ok lines = " + node.line + " demerits = " + node.totalDemerits);
+                            //log.debug("                      ok lines = " + node.line + " demerits = " + node.totalDemerits);
                         }
                     }
                 }
@@ -1105,8 +1104,8 @@
                shorter or longer lines */
             //TODO This code snippet is disabled. Reenable?
             if (false && alignment == EN_JUSTIFY && textAlignment == EN_JUSTIFY) {
-                //System.out.println("LLM.getNextKnuthElements> layouts with more lines? " + lineLayouts.canUseMoreLines());
-                //System.out.println("                          layouts with fewer lines? " + lineLayouts.canUseLessLines());
+                //log.debug("LLM.getNextKnuthElements> layouts with more lines? " + lineLayouts.canUseMoreLines());
+                //log.debug("                          layouts with fewer lines? " + lineLayouts.canUseLessLines());
                 if (!lineLayouts.canUseMoreLines()) {
                     alg.resetAlgorithm();
                     lineLayouts.savePossibilities(true);
@@ -1132,8 +1131,8 @@
                     lineLayouts.restorePossibilities();
                     iLineWidth = savedLineWidth;
                 }
-                //System.out.println("LLM.getNextKnuthElements> now, layouts with more lines? " + lineLayouts.canUseMoreLines());
-                //System.out.println("                          now, layouts with fewer lines? " + lineLayouts.canUseLessLines());
+                //log.debug("LLM.getNextKnuthElements> now, layouts with more lines? " + lineLayouts.canUseMoreLines());
+                //log.debug("                          now, layouts with fewer lines? " + lineLayouts.canUseLessLines());
             }
         }
         return lineLayouts;
@@ -1299,7 +1298,7 @@
             breaker.add(new KnuthPenalty(0, 0, false, elementPosition, false));
         }
 
-        //System.out.println("first=" + nFirstLines + " inner=" + nInnerLines
+        //log.debug("first=" + nFirstLines + " inner=" + nInnerLines
         //                   + " optional=" + nOptionalLines + " eliminable=" + nEliminableLines
         //                   + " last=" + nLastLines
         //                   + " (condOpt=" + nConditionalOptionalLines + " condEl=" + nConditionalEliminableLines + ")");
@@ -1386,7 +1385,7 @@
         //}
         //int lineNumberDifference = (int)((double) totalAdj / constantLineHeight);
         int lineNumberDifference = (int) Math.round((double) totalAdj / constantLineHeight + (adj > 0 ? - 0.4 : 0.4));
-        //System.out.println("   LLM> variazione calcolata = " + ((double) totalAdj / constantLineHeight) + " variazione applicata = " + lineNumberDifference);
+        //log.debug("   LLM> variazione calcolata = " + ((double) totalAdj / constantLineHeight) + " variazione applicata = " + lineNumberDifference);
         lineLayouts = (LineLayoutPossibilities)lineLayoutsList.get(pos.getLeafPos());
         lineNumberDifference = lineLayouts.applyLineCountAdjustment(lineNumberDifference);
         return lineNumberDifference * constantLineHeight;
@@ -1405,7 +1404,7 @@
         LinkedList returnList = new LinkedList();
         for (int p = 0; p < knuthParagraphs.size(); p++) {
             lineLayouts = (LineLayoutPossibilities)lineLayoutsList.get(p);
-            //System.out.println("demerits of the chosen layout: " + lineLayouts.getChosenDemerits());
+            //log.debug("demerits of the chosen layout: " + lineLayouts.getChosenDemerits());
             for (int i = 0; i < lineLayouts.getChosenLineCount(); i++) {
                 if (!((BlockLevelLayoutManager) parentLM).mustKeepTogether()
                     && i >= fobj.getOrphans()
@@ -1414,10 +1413,10 @@
                     returnList.add(new KnuthPenalty(0, 0, false, new Position(this), false));
                 }
                 LineBreakPosition lbp = (LineBreakPosition) lineLayouts.getChosenPosition(i);
-                //System.out.println("LLM.getChangedKnuthElements> lineWidth= " + lbp.lineWidth + " difference= " + lbp.difference);
-                //System.out.println("                             shrink= " + lbp.availableShrink + " stretch= " + lbp.availableStretch);
+                //log.debug("LLM.getChangedKnuthElements> lineWidth= " + lbp.lineWidth + " difference= " + lbp.difference);
+                //log.debug("                             shrink= " + lbp.availableShrink + " stretch= " + lbp.availableStretch);
 
-                //System.out.println("linewidth= " + lbp.lineWidth + " difference= " + lbp.difference + " indent= " + lbp.startIndent);
+                //log.debug("linewidth= " + lbp.lineWidth + " difference= " + lbp.difference + " indent= " + lbp.startIndent);
                 MinOptMax contentIPD;
                 if (alignment == EN_JUSTIFY) {
                     contentIPD = new MinOptMax(
@@ -1750,8 +1749,8 @@
                         updatedRatio = (float) updatedDifference / lbp.availableShrink;
                     }
                     lc.setIPDAdjust(updatedRatio);
-                    //System.out.println("LLM.addAreas> old difference = " + lbp.difference + " new difference = " + updatedDifference);
-                    //System.out.println("              old ratio = " + lbp.ipdAdjust + " new ratio = " + updatedRatio);
+                    //log.debug("LLM.addAreas> old difference = " + lbp.difference + " new difference = " + updatedDifference);
+                    //log.debug("              old ratio = " + lbp.ipdAdjust + " new ratio = " + updatedRatio);
                 } else if (false && textAlignment == EN_CENTER) {
                     // re-compute indent
                     int updatedIndent = lbp.startIndent

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/LineLayoutPossibilities.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/LineLayoutPossibilities.java?rev=344111&r1=344110&r2=344111&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/LineLayoutPossibilities.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/LineLayoutPossibilities.java Mon Nov 14 04:55:46 2005
@@ -157,7 +157,8 @@
                 chosenIndex = optimumIndex;
             }
         }
-/*LF*/  //System.out.println(">> minLineCount = " + getMinLineCount() + " optLineCount = " + getOptLineCount() + " maxLineCount() = " + getMaxLineCount());
+        //log.debug(">> minLineCount = " + getMinLineCount() 
+        //  + " optLineCount = " + getOptLineCount() + " maxLineCount() = " + getMaxLineCount());
     }
 
     public void addBreakPosition(Position pos, int i) {

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/list/ListItemLayoutManager.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/list/ListItemLayoutManager.java?rev=344111&r1=344110&r2=344111&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/list/ListItemLayoutManager.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/list/ListItemLayoutManager.java Mon Nov 14 04:55:46 2005
@@ -385,10 +385,10 @@
         while (oldListIterator.hasNext()) {
             oldElement = (KnuthElement)oldListIterator.next();
             Position innerPosition = ((NonLeafPosition) oldElement.getPosition()).getPosition();
-            //System.out.println(" BLM> unwrapping: " + (oldElement.isBox() 
+            //log.debug(" BLM> unwrapping: " + (oldElement.isBox() 
             //  ? "box    " : (oldElement.isGlue() ? "glue   " : "penalty")) 
             //  + " creato da " + oldElement.getLayoutManager().getClass().getName());
-            //System.out.println(" BLM> unwrapping:         " 
+            //log.debug(" BLM> unwrapping:         " 
             //  + oldElement.getPosition().getClass().getName());
             if (innerPosition != null) {
                 // oldElement was created by a descendant of this BlockLM

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/table/TableContentLayoutManager.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/table/TableContentLayoutManager.java?rev=344111&r1=344110&r2=344111&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/table/TableContentLayoutManager.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/table/TableContentLayoutManager.java Mon Nov 14 04:55:46 2005
@@ -692,24 +692,20 @@
         TableBody body = null;
         while (iterator.hasNext()) {
             Position pos = (Position)iterator.next();
-            //System.out.println(pos);
             if (pos instanceof TableContentPosition) {
                 TableContentPosition tcpos = (TableContentPosition)pos;
                 lst.add(tcpos);
-                //System.out.println(tcpos.row);
                 GridUnitPart part = (GridUnitPart)tcpos.gridUnitParts.get(0);
                 if (body == null) {
                     body = part.pgu.getBody();
                 }
                 if (tcpos.getFlag(TableContentPosition.FIRST_IN_ROWGROUP) 
                         && tcpos.row.getFlag(EffRow.FIRST_IN_BODY)) {
-                    //System.out.println("pgu is first in body");
                     firstPos = true;
 
                 }
                 if (tcpos.getFlag(TableContentPosition.LAST_IN_ROWGROUP) 
                         && tcpos.row.getFlag(EffRow.LAST_IN_BODY)) {
-                    //System.out.println("pgu is last in body");
                     lastPos = true;
                     getTableLM().getCurrentPV().addMarkers(body.getMarkers(), 
                             true, firstPos, lastPos);

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/PDFDocument.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/PDFDocument.java?rev=344111&r1=344110&r2=344111&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/PDFDocument.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/PDFDocument.java Mon Nov 14 04:55:46 2005
@@ -394,8 +394,6 @@
         //Add object to list
         this.objects.add(obj);
 
-        //System.out.println("Registering: "+obj);
-
         //Add object to special lists where necessary
         if (obj instanceof PDFFunction) {
             this.functions.add(obj);

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/PDFEncryptionManager.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/PDFEncryptionManager.java?rev=344111&r1=344110&r2=344111&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/PDFEncryptionManager.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/PDFEncryptionManager.java Mon Nov 14 04:55:46 2005
@@ -118,19 +118,19 @@
             return (PDFEncryption)obj;
         } catch (ClassNotFoundException e) {
             if (checkAvailableAlgorithms()) {
-                System.out.println("JCE and algorithms available, but the "
+                log.warn("JCE and algorithms available, but the "
                     + "implementation class unavailable. Please do a full "
                     + "rebuild.");
             }
             return null;
         } catch (NoSuchMethodException e) {
-            e.printStackTrace();
+            log.error(e);
             return null;
         } catch (IllegalAccessException e) {
-            e.printStackTrace();
+            log.error(e);
             return null;
         } catch (InvocationTargetException e) {
-            e.printStackTrace();
+            log.error(e);
             return null;
         }
     }

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/PDFState.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/PDFState.java?rev=344111&r1=344110&r2=344111&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/PDFState.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/PDFState.java Mon Nov 14 04:55:46 2005
@@ -163,7 +163,6 @@
      */
     public boolean setColor(Color col) {
         if (!col.equals(getData().color)) {
-            //System.out.println("old: " + getData().color + ", new: " + col);
             getData().color = col;
             return true;
         } else {

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/PDFStream.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/PDFStream.java?rev=344111&r1=344110&r2=344111&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/PDFStream.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/PDFStream.java Mon Nov 14 04:55:46 2005
@@ -44,7 +44,7 @@
         try {
             data = StreamCacheFactory.getInstance().createStreamCache();
         } catch (IOException ex) {
-            /**@todo Log with Logger */
+            //TODO throw the exception and catch it elsewhere
             ex.printStackTrace();
         }
     }
@@ -58,7 +58,7 @@
         try {
             data.getOutputStream().write(s.getBytes());
         } catch (IOException ex) {
-            /**@todo Log with Logger */
+            //TODO throw the exception and catch it elsewhere
             ex.printStackTrace();
         }
 
@@ -82,6 +82,7 @@
         try {
             return data.getSize();
         } catch (Exception e) {
+            //TODO throw the exception and catch it elsewhere
             e.printStackTrace();
             return 0;
         }

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/TempFileStreamCache.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/TempFileStreamCache.java?rev=344111&r1=344110&r2=344111&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/TempFileStreamCache.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/TempFileStreamCache.java Mon Nov 14 04:55:46 2005
@@ -25,7 +25,7 @@
 import java.io.File;
 
 //Commons
-import org.apache.commons.io.CopyUtils;
+import org.apache.commons.io.IOUtils;
 
 /**
  * StreamCache implementation that uses temporary files rather than heap.
@@ -90,11 +90,13 @@
         output.close();
         output = null;
 
-        // don't need a buffer because streamCopy is buffered
+        // don't need a buffer because copy() is buffered
         InputStream input = new java.io.FileInputStream(tempFile);
-        final long bytesCopied = CopyUtils.copy(input, out);
-        input.close();
-        return (int)bytesCopied;
+        try {
+            return IOUtils.copy(input, out);
+        } finally {
+            IOUtils.closeQuietly(input);
+        }
     }
 
     /**

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/bitmap/TIFFRenderer.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/bitmap/TIFFRenderer.java?rev=344111&r1=344110&r2=344111&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/bitmap/TIFFRenderer.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/bitmap/TIFFRenderer.java Mon Nov 14 04:55:46 2005
@@ -202,8 +202,8 @@
             try {
                 pageImage = getPageImage(current++);
             } catch (FOPException e) {
-                // TODO Auto-generated catch block
-                e.printStackTrace();
+                log.error(e);
+                return null;
             }
 
             switch (renderParams.getCompression()) {

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/java2d/Java2DRenderer.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/java2d/Java2DRenderer.java?rev=344111&r1=344110&r2=344111&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/java2d/Java2DRenderer.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/java2d/Java2DRenderer.java Mon Nov 14 04:55:46 2005
@@ -1084,7 +1084,7 @@
           renderPageAreas(viewport.getPage());
           return PAGE_EXISTS;
         } catch (FOPException e) {
-            e.printStackTrace();
+            log.error(e);
             return NO_SUCH_PAGE;
         } finally {
           oldState = state;

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/PDFRenderer.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/PDFRenderer.java?rev=344111&r1=344110&r2=344111&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/PDFRenderer.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/PDFRenderer.java Mon Nov 14 04:55:46 2005
@@ -1027,7 +1027,7 @@
         int rx = currentIPPosition + ch.getBorderAndPaddingWidthStart();
         int bl = currentBPPosition + ch.getOffset() + ch.getBaselineOffset();
 
-/*        System.out.println("Text = " + ch.getTextArea() +
+/*        log.debug("Text = " + ch.getTextArea() +
             "; text width: " + ch.getWidth() +
             "; BlockIP Position: " + currentBlockIPPosition +
             "; currentBPPosition: " + currentBPPosition +
@@ -1096,7 +1096,7 @@
         int rx = currentIPPosition + text.getBorderAndPaddingWidthStart();
         int bl = currentBPPosition + text.getOffset() + text.getBaselineOffset();
 
-/*        System.out.println("Text = " + text.getTextArea() +
+/*        log.debug("Text = " + text.getTextArea() +
             "; text width: " + text.getWidth() +
             "; BlockIP Position: " + currentBlockIPPosition +
             "; currentBPPosition: " + currentBPPosition +

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/print/PrintRenderer.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/print/PrintRenderer.java?rev=344111&r1=344110&r2=344111&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/print/PrintRenderer.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/print/PrintRenderer.java Mon Nov 14 04:55:46 2005
@@ -141,7 +141,7 @@
         try {
             printerJob.print();
         } catch (PrinterException e) {
-            e.printStackTrace();
+            log.error(e);
             throw new IOException("Unable to print: " + e.getClass().getName()
                     + ": " + e.getMessage());
         }

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/ps/PSFontUtils.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/ps/PSFontUtils.java?rev=344111&r1=344110&r2=344111&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/ps/PSFontUtils.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/ps/PSFontUtils.java Mon Nov 14 04:55:46 2005
@@ -29,8 +29,8 @@
 import javax.xml.transform.Source;
 import javax.xml.transform.stream.StreamSource;
 
-import org.apache.commons.io.CopyUtils;
 import org.apache.commons.io.EndianUtils;
+import org.apache.commons.io.IOUtils;
 import org.apache.fop.fonts.CustomFont;
 import org.apache.fop.fonts.FontInfo;
 import org.apache.fop.fonts.FontType;
@@ -116,7 +116,7 @@
                 gen.writeln("end");
                 gen.writeln("/" + fm.getFontName() + " exch definefont pop");
             } else {
-                System.out.println("Only WinAnsiEncoding is supported. Font '" 
+                gen.commentln("%WARNING: Only WinAnsiEncoding is supported. Font '" 
                     + fm.getFontName() + "' asks for: " + fm.getEncoding());
             }
         }
@@ -163,7 +163,7 @@
 
                     SubInputStream sin = new SubInputStream(in, dataSegLen);
                     ASCIIHexOutputStream hexOut = new ASCIIHexOutputStream(gen.getOutputStream());
-                    CopyUtils.copy(sin, hexOut);
+                    IOUtils.copy(sin, hexOut);
                     gen.newLine();
                     break;
                 case 3: //EOF

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/ps/PSGraphics2D.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/ps/PSGraphics2D.java?rev=344111&r1=344110&r2=344111&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/ps/PSGraphics2D.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/ps/PSGraphics2D.java Mon Nov 14 04:55:46 2005
@@ -190,6 +190,7 @@
      * @param ioe IOException to handle
      */
     protected void handleIOException(IOException ioe) {
+        //TODO Surely, there's a better way to do this.
         ioe.printStackTrace();
     }
 

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/ps/PSTextPainter.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/ps/PSTextPainter.java?rev=344111&r1=344110&r2=344111&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/ps/PSTextPainter.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/ps/PSTextPainter.java Mon Nov 14 04:55:46 2005
@@ -61,7 +61,6 @@
  * (todo) use drawString(AttributedCharacterIterator iterator...) for some
  *
  * @author <a href="mailto:keiron@aftexsw.com">Keiron Liddle</a>
- * @author <a href="mailto:jeremias@apache.org">Jeremias Maerki</a>
  * @version $Id: PSTextPainter.java,v 1.15 2003/01/08 14:03:55 jeremias Exp $
  */
 public class PSTextPainter implements TextPainter {
@@ -93,7 +92,6 @@
      * @param g2d the Graphics2D to use
      */
     public void paint(TextNode node, Graphics2D g2d) {
-        // System.out.println("PSText paint");
         String txt = node.getText();
         Point2D loc = node.getLocation();
     
@@ -251,7 +249,6 @@
      * @return new current location
      */
     protected Point2D paintACI(AttributedCharacterIterator aci, Graphics2D g2d, Point2D loc) {
-        //System.out.println("==============================================");
         //ACIUtils.dumpAttrs(aci);
         
         aci.first();
@@ -498,7 +495,6 @@
      * @return null
      */
     public Mark getMark(TextNode node, int pos, boolean all) {
-        System.out.println("PSText getMark");
         return null;
     }
 
@@ -511,7 +507,6 @@
      * @return null
      */
     public Mark selectAt(double x, double y, TextNode node) {
-        System.out.println("PSText selectAt");
         return null;
     }
 
@@ -524,7 +519,6 @@
      * @return null
      */
     public Mark selectTo(double x, double y, Mark beginMark) {
-        System.out.println("PSText selectTo");
         return null;
     }
 
@@ -535,7 +529,6 @@
      * @return null
      */
     public Mark selectFirst(TextNode node) {
-        System.out.println("PSText selectFirst");
         return null;
     }
 
@@ -546,7 +539,6 @@
      * @return null
      */
     public Mark selectLast(TextNode node) {
-        System.out.println("PSText selectLast");
         return null;
     }
 
@@ -558,7 +550,6 @@
      * @return null
      */
     public int[] getSelected(Mark start, Mark finish) {
-        System.out.println("PSText getSelected");
         return null;
     }
 
@@ -570,7 +561,6 @@
      * @return null
      */
     public Shape getHighlightShape(Mark beginMark, Mark endMark) {
-        System.out.println("PSText getHighlightShape");
         return null;
     }
 

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/xml/XMLXMLHandler.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/xml/XMLXMLHandler.java?rev=344111&r1=344110&r2=344111&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/xml/XMLXMLHandler.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/xml/XMLXMLHandler.java Mon Nov 14 04:55:46 2005
@@ -18,6 +18,8 @@
  
 package org.apache.fop.render.xml;
 
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 import org.apache.fop.render.XMLHandler;
 import org.apache.fop.render.RendererContext;
 
@@ -38,6 +40,9 @@
     /** Key for getting the TransformerHandler from the RendererContext */
     public static final String HANDLER = "handler";
 
+    /** Logging instance */
+    private static Log log = LogFactory.getLog(XMLXMLHandler.class);
+    
     private AttributesImpl atts = new AttributesImpl();
     
     /** @see org.apache.fop.render.XMLHandler */
@@ -105,7 +110,7 @@
                 handler.endCDATA();
                 break;
             case Node.ENTITY_REFERENCE_NODE:
-                System.out.println("Ignoring ENTITY_REFERENCE_NODE. NYI");
+                log.warn("Ignoring ENTITY_REFERENCE_NODE. NYI");
                 /*
                 writer.write("&");
                 writer.write();

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/svg/PDFANode.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/src/java/org/apache/fop/svg/PDFANode.java?rev=344111&r1=344110&r2=344111&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/svg/PDFANode.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/svg/PDFANode.java Mon Nov 14 04:55:46 2005
@@ -101,6 +101,7 @@
                             }
                         }
                     } catch (Exception e) {
+                        //TODO Move this to setDestination() and throw an IllegalArgumentException 
                         e.printStackTrace();
                     }
                     Rectangle2D destRect = new Rectangle2D.Float(x, y, width, height);

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/svg/PDFGraphics2D.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/src/java/org/apache/fop/svg/PDFGraphics2D.java?rev=344111&r1=344110&r2=344111&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/svg/PDFGraphics2D.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/svg/PDFGraphics2D.java Mon Nov 14 04:55:46 2005
@@ -240,6 +240,7 @@
      * @param ioe IOException to handle
      */
     protected void handleIOException(IOException ioe) {
+        //TODO Surely, there's a better way to do this.
         ioe.printStackTrace();
     }
 
@@ -439,7 +440,6 @@
     public boolean drawImage(Image img, int x, int y,
                              ImageObserver observer) {
         preparePainting();
-        // System.err.println("drawImage:x, y");
 
         int width = img.getWidth(observer);
         int height = img.getHeight(observer);
@@ -493,8 +493,6 @@
     public boolean drawImage(Image img, int x, int y, int width, int height,
                                ImageObserver observer) {
         preparePainting();
-        //System.out.println("drawImage x=" + x + " y=" + y 
-        //+ " width=" + width + " height=" + height + " image=" + img.toString());
         // first we look to see if we've already added this image to
         // the pdf document. If so, we just reuse the reference;
         // otherwise we have to build a FopImage and add it to the pdf
@@ -637,7 +635,6 @@
      * @see         java.awt.Graphics#create
      */
     public void dispose() {
-        // System.out.println("dispose");
         pdfDoc = null;
         fontInfo = null;
         currentStream = null;
@@ -662,7 +659,6 @@
      */
     public void draw(Shape s) {
         preparePainting();
-        // System.out.println("draw(Shape)");
 
         //Transparency shortcut
         Color c;
@@ -833,7 +829,8 @@
             //PDFColor  currentColour = new PDFColor(blackMagenta[0], blackMagenta[1]);
             //currentStream.write(currentColour.getColorSpaceOut(fill));
         } else {
-            System.err.println("Color Space not supported by PDFGraphics2D");
+            throw new UnsupportedOperationException(
+                    "Color Space not supported by PDFGraphics2D");
         }
     }
 
@@ -1319,7 +1316,7 @@
      * @see #setClip
      */
     public void drawRenderedImage(RenderedImage img, AffineTransform xform) {
-        //System.out.println("drawRenderedImage");
+        //NYI
     }
 
     /**
@@ -1354,7 +1351,7 @@
      */
     public void drawRenderableImage(RenderableImage img,
                                     AffineTransform xform) {
-        //System.out.println("drawRenderableImage");
+        //NYI
     }
 
     /**
@@ -1383,7 +1380,6 @@
      */
     public void drawString(String s, float x, float y) {
         preparePainting();
-        // System.out.println("drawString(String)");
 
         Font fontState;
         if (ovFontState == null) {
@@ -1550,7 +1546,6 @@
     public void drawString(AttributedCharacterIterator iterator, float x,
                            float y) {
         preparePainting();
-        System.err.println("drawString(AttributedCharacterIterator)");
 
         Font fontState = null;
 
@@ -1630,7 +1625,6 @@
      */
     public void fill(Shape s) {
         preparePainting();
-        // System.err.println("fill");
 
         //Transparency shortcut
         Color c;
@@ -1828,7 +1822,7 @@
      * @param     c1 the XOR alternation color
      */
     public void setXORMode(Color c1) {
-        //System.out.println("setXORMode");
+        //NYI
     }
 
 
@@ -1853,7 +1847,7 @@
      */
     public void copyArea(int x, int y, int width, int height, int dx,
                          int dy) {
-        //System.out.println("copyArea");
+        //NYI
     }
 
 }

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/svg/PDFGraphicsConfiguration.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/src/java/org/apache/fop/svg/PDFGraphicsConfiguration.java?rev=344111&r1=344110&r2=344111&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/svg/PDFGraphicsConfiguration.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/svg/PDFGraphicsConfiguration.java Mon Nov 14 04:55:46 2005
@@ -70,7 +70,7 @@
     }
 
     /**
-     * FIXX ME: This should return the page bounds in Pts,
+     * TODO: This should return the page bounds in Pts,
      * I couldn't figure out how to get this for the current
      * page from the PDFDocument (this still works for now,
      * but it should be fixed...).
@@ -78,7 +78,6 @@
      * @return the bounds of the PDF document page
      */
     public Rectangle getBounds() {
-        System.out.println("getting getBounds");
         return null;
     }
 
@@ -110,7 +109,6 @@
      * @return the default transform for the configuration
      */
     public AffineTransform getDefaultTransform() {
-        System.out.println("getting getDefaultTransform");
         return new AffineTransform();
     }
 
@@ -122,7 +120,6 @@
      * @return the normalizing transform for the configuration
      */
     public AffineTransform getNormalizingTransform() {
-        System.out.println("getting getNormalizingTransform");
         return new AffineTransform(2, 0, 0, 2, 0, 0);
     }
 

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/svg/PDFImageElementBridge.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/src/java/org/apache/fop/svg/PDFImageElementBridge.java?rev=344111&r1=344110&r2=344111&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/svg/PDFImageElementBridge.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/svg/PDFImageElementBridge.java Mon Nov 14 04:55:46 2005
@@ -1,5 +1,5 @@
 /*
- * Copyright 1999-2004 The Apache Software Foundation.
+ * Copyright 1999-2005 The Apache Software Foundation.
  * 
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -20,10 +20,6 @@
 
 import org.apache.batik.bridge.SVGImageElementBridge;
 
-import org.apache.fop.image.JpegImage;
-import org.apache.fop.image.FopImage;
-import org.apache.fop.image.analyser.ImageReaderFactory;
-
 import java.awt.Shape;
 import java.awt.Graphics2D;
 import java.awt.geom.Rectangle2D;
@@ -32,12 +28,15 @@
 
 import org.w3c.dom.Element;
 
-import org.apache.commons.logging.impl.SimpleLog;
 import org.apache.batik.bridge.BridgeContext;
 import org.apache.batik.gvt.AbstractGraphicsNode;
 import org.apache.batik.gvt.GraphicsNode;
 import org.apache.batik.util.ParsedURL;
 
+import org.apache.fop.image.JpegImage;
+import org.apache.fop.image.FopImage;
+import org.apache.fop.image.analyser.ImageReaderFactory;
+
 /**
  * Bridge class for the &lt;image> element when jpeg images.
  *
@@ -55,12 +54,12 @@
      * THis checks if it is a jpeg file and creates a jpeg node
      * so the jpeg can be inserted directly into the pdf document.
      * @param ctx the bridge context
-     * @param e the svg element for the image
+     * @param imageElement the svg element for the image
      * @param purl the parsed url for the image resource
      * @return a new graphics node
      */
     protected GraphicsNode createImageGraphicsNode
-        (BridgeContext ctx, Element e, ParsedURL purl) {
+        (BridgeContext ctx, Element imageElement, ParsedURL purl) {
         try {
             InputStream is = purl.openStream();
             if (!is.markSupported()) {
@@ -71,38 +70,41 @@
             byte [] data = new byte[3];
             is.read(data);
             is.reset();
-            if ((data[0] == (byte)0xFF) && (data[1] == (byte)0xD8) && 
-                (data[2] == (byte)0xFF)) {
-            FopImage.ImageInfo ii = ImageReaderFactory.make
-                    (purl.toString(), is, null);
+            if ((data[0] == (byte)0xFF) 
+                    && (data[1] == (byte)0xD8) 
+                    && (data[2] == (byte)0xFF)) {
+                FopImage.ImageInfo ii = ImageReaderFactory.make
+                        (purl.toString(), is, null);
                 JpegImage jpeg = new JpegImage(ii);
-                SimpleLog logger = new SimpleLog("FOP/SVG");
-                logger.setLevel(SimpleLog.LOG_LEVEL_INFO);
                 jpeg.load(FopImage.ORIGINAL_DATA);
                 PDFJpegNode node = new PDFJpegNode(jpeg, ctx, e, purl);
-
+    
                 Rectangle2D imgBounds = getImageBounds(ctx, e);
-            Rectangle2D bounds = node.getPrimitiveBounds();
-            float [] vb = new float[4];
-            vb[0] = 0; // x
-            vb[1] = 0; // y
-            vb[2] = (float) bounds.getWidth(); // width
-            vb[3] = (float) bounds.getHeight(); // height
-
+                Rectangle2D bounds = node.getPrimitiveBounds();
+                float [] vb = new float[4];
+                vb[0] = 0; // x
+                vb[1] = 0; // y
+                vb[2] = (float) bounds.getWidth(); // width
+                vb[3] = (float) bounds.getHeight(); // height
+    
                 // handles the 'preserveAspectRatio', 'overflow' and 'clip' 
                 // and sets the appropriate AffineTransform to the image node
                 initializeViewport(ctx, e, node, vb, imgBounds);
-            return node;
+                return node;
             }
         } catch (Exception ex) {
+            //TODO Handle this exception
         }
 
         return superCreateGraphicsNode(ctx, e, purl);
     }
 
+    /**
+     * @see org.apache.batik.bridge.SVGImageElementBridge
+     */
     protected GraphicsNode superCreateGraphicsNode
-        (BridgeContext ctx, Element e, ParsedURL purl) {
-        return super.createImageGraphicsNode(ctx, e, purl);
+        (BridgeContext ctx, Element imageElement, ParsedURL purl) {
+        return super.createImageGraphicsNode(ctx, imageElement, purl);
     }
 
 
@@ -112,21 +114,26 @@
      * the PDFGraphics2D.
      */
     public class PDFJpegNode extends AbstractGraphicsNode {
+        
         private JpegImage jpeg;
         private BridgeContext ctx;
-        private Element e;
+        private Element imageElement;
         private ParsedURL purl;
-        private GraphicsNode origGraphicsNode=null;
+        private GraphicsNode origGraphicsNode = null;
+        
         /**
          * Create a new pdf jpeg node for drawing jpeg images
          * into pdf graphics.
          * @param j the jpeg image
+         * @param ctx the bridge context
+         * @param imageElement the SVG image element
+         * @param purl the URL to the image
          */
         public PDFJpegNode(JpegImage j, BridgeContext ctx, 
-                           Element e, ParsedURL purl) {
+                           Element imageElement, ParsedURL purl) {
             this.jpeg = j;
             this.ctx  = ctx;
-            this.e    = e;
+            this.imageElement = imageElement;
             this.purl = purl;
         }
 
@@ -154,6 +161,7 @@
                     float height = jpeg.getHeight();
                     pdfg.addJpegImage(jpeg, x, y, width, height);
                 } catch (Exception e) {
+                    //TODO Handle this exception properly
                     e.printStackTrace();
                 }
             } else {
@@ -162,9 +170,9 @@
                 if (origGraphicsNode == null) {
                     // Haven't constructed baseclass Graphics Node,
                     // so do so now.
-                    origGraphicsNode = 
-                        PDFImageElementBridge.this.superCreateGraphicsNode
-                        (ctx,  e, purl);
+                    origGraphicsNode 
+                        = PDFImageElementBridge.this.superCreateGraphicsNode
+                            (ctx,  imageElement, purl);
                 }
                 origGraphicsNode.primitivePaint(g2d);
             }
@@ -187,6 +195,7 @@
                 return new Rectangle2D.Double(0, 0, jpeg.getWidth(),
                                               jpeg.getHeight());
             } catch (Exception e) {
+                //TODO Handle this exception properly
                 e.printStackTrace();
             }
             return null;

Propchange: xmlgraphics/fop/trunk/src/java/org/apache/fop/svg/PDFImageElementBridge.java
------------------------------------------------------------------------------
    svn:keywords = Id

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/svg/PDFTextPainter.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/src/java/org/apache/fop/svg/PDFTextPainter.java?rev=344111&r1=344110&r2=344111&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/svg/PDFTextPainter.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/svg/PDFTextPainter.java Mon Nov 14 04:55:46 2005
@@ -84,7 +84,6 @@
      * @param g2d the Graphics2D to use
      */
     public void paint(TextNode node, Graphics2D g2d) {
-        // System.out.println("PDFText paint");
         String txt = node.getText();
         Point2D loc = node.getLocation();
         
@@ -328,7 +327,6 @@
      * @return null
      */
     public Mark getMark(TextNode node, int pos, boolean all) {
-        System.out.println("PDFText getMark");
         return null;
     }
 
@@ -341,7 +339,6 @@
      * @return null
      */
     public Mark selectAt(double x, double y, TextNode node) {
-        System.out.println("PDFText selectAt");
         return null;
     }
 
@@ -354,7 +351,6 @@
      * @return null
      */
     public Mark selectTo(double x, double y, Mark beginMark) {
-        System.out.println("PDFText selectTo");
         return null;
     }
 
@@ -365,7 +361,6 @@
      * @return null
      */
     public Mark selectFirst(TextNode node) {
-        System.out.println("PDFText selectFirst");
         return null;
     }
 
@@ -376,7 +371,6 @@
      * @return null
      */
     public Mark selectLast(TextNode node) {
-        System.out.println("PDFText selectLast");
         return null;
     }
 
@@ -388,7 +382,6 @@
      * @return null
      */
     public int[] getSelected(Mark start, Mark finish) {
-        System.out.println("PDFText getSelected");
         return null;
     }
 
@@ -400,7 +393,6 @@
      * @return null
      */
     public Shape getHighlightShape(Mark beginMark, Mark endMark) {
-        System.out.println("PDFText getHighlightShape");
         return null;
     }
 

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/util/ASCII85InputStream.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/src/java/org/apache/fop/util/ASCII85InputStream.java?rev=344111&r1=344110&r2=344111&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/util/ASCII85InputStream.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/util/ASCII85InputStream.java Mon Nov 14 04:55:46 2005
@@ -31,7 +31,6 @@
  * The filter is described in chapter 3.13.3 of the PostScript Language 
  * Reference (third edition).
  *
- * @author <a href="mailto:jeremias@apache.org">Jeremias Maerki</a>
  * @version $Id$
  */
 public class ASCII85InputStream extends InputStream
@@ -119,7 +118,6 @@
         } else {
             int cIndex = 0;
             tuple = (buf - START) * POW85[cIndex];
-            //System.out.println(cIndex + ": " + Long.toHexString(tuple));
             cIndex++;
             while (cIndex < 5) {
                 buf = filteredRead();
@@ -131,7 +129,6 @@
                     throw new IOException("Illegal 'z' within tuple");
                 } else {
                     tuple += (buf - START) * POW85[cIndex];
-                    //System.out.println(cIndex + ": " + Long.toHexString(tuple));
                     cIndex++;
                 }
             }

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/util/ASCII85OutputStream.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/src/java/org/apache/fop/util/ASCII85OutputStream.java?rev=344111&r1=344110&r2=344111&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/util/ASCII85OutputStream.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/util/ASCII85OutputStream.java Mon Nov 14 04:55:46 2005
@@ -25,7 +25,6 @@
 /**
  * This class applies a ASCII85 encoding to the stream.
  *
- * @author <a href="mailto:jeremias@apache.org">Jeremias Maerki</a>
  * @version $Id$
  */
 public class ASCII85OutputStream extends FilterOutputStream

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/util/CloseBlockerOutputStream.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/src/java/org/apache/fop/util/CloseBlockerOutputStream.java?rev=344111&r1=344110&r2=344111&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/util/CloseBlockerOutputStream.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/util/CloseBlockerOutputStream.java Mon Nov 14 04:55:46 2005
@@ -38,7 +38,6 @@
      * @see java.io.OutputStream#close()
      */
     public void close() throws IOException {
-        //System.out.println("Not sending close() to " + out);
         try {
             flush();
         } catch (IOException ioe) {

Modified: xmlgraphics/fop/trunk/src/sandbox/org/apache/fop/render/pcl/PCLRenderer.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/src/sandbox/org/apache/fop/render/pcl/PCLRenderer.java?rev=344111&r1=344110&r2=344111&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/sandbox/org/apache/fop/render/pcl/PCLRenderer.java (original)
+++ xmlgraphics/fop/trunk/src/sandbox/org/apache/fop/render/pcl/PCLRenderer.java Mon Nov 14 04:55:46 2005
@@ -69,7 +69,7 @@
             try {
                 fontcode = Integer.parseInt(name.substring(1));
             } catch (Exception e) {
-                e.printStackTrace();
+                log.error(e);
             }
         }
         switch (fontcode) {

Modified: xmlgraphics/fop/trunk/src/sandbox/org/apache/fop/render/pcl/PCLStream.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/src/sandbox/org/apache/fop/render/pcl/PCLStream.java?rev=344111&r1=344110&r2=344111&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/sandbox/org/apache/fop/render/pcl/PCLStream.java (original)
+++ xmlgraphics/fop/trunk/src/sandbox/org/apache/fop/render/pcl/PCLStream.java Mon Nov 14 04:55:46 2005
@@ -44,8 +44,6 @@
         try {
             out.write(buff);
         } catch (IOException e) {
-            // e.printStackTrace();
-            // e.printStackTrace(System.out);
             throw new RuntimeException(e.toString());
         }
     }

Modified: xmlgraphics/fop/trunk/test/java/org/apache/fop/util/ASCII85InputStreamTestCase.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/test/java/org/apache/fop/util/ASCII85InputStreamTestCase.java?rev=344111&r1=344110&r2=344111&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/test/java/org/apache/fop/util/ASCII85InputStreamTestCase.java (original)
+++ xmlgraphics/fop/trunk/test/java/org/apache/fop/util/ASCII85InputStreamTestCase.java Mon Nov 14 04:55:46 2005
@@ -1,5 +1,5 @@
 /*
- * Copyright 1999-2004 The Apache Software Foundation.
+ * Copyright 1999-2005 The Apache Software Foundation.
  * 
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -22,7 +22,7 @@
 import java.io.IOException;
 import java.io.InputStream;
 
-import org.apache.commons.io.CopyUtils;
+import org.apache.commons.io.IOUtils;
 import org.apache.commons.io.output.ByteArrayOutputStream;
 import org.apache.fop.pdf.PDFText;
 
@@ -34,8 +34,6 @@
  * ATTENTION: Some of the tests here depend on the correct behaviour of
  * ASCII85OutputStream. If something fails here make sure 
  * ASCII85OutputStreamTestCase runs!
- * 
- * @author <a href="mailto:jeremias@apache.org">Jeremias Maerki</a>
  */
 public class ASCII85InputStreamTestCase extends TestCase {
 
@@ -52,10 +50,7 @@
         byte[] ascii85 = text.getBytes("US-ASCII");
         InputStream in = new ByteArrayInputStream(ascii85);
         InputStream decoder = new ASCII85InputStream(in);
-        ByteArrayOutputStream baout = new ByteArrayOutputStream();
-        CopyUtils.copy(decoder, baout);
-        baout.close();
-        return baout.toByteArray();
+        return IOUtils.toByteArray(decoder);
     }
 
     private byte[] getChunk(int count) {



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