pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From msahy...@apache.org
Subject svn commit: r1823085 - in /pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox: contentstream/PDAbstractContentStream.java pdmodel/PDPageContentStream.java
Date Sun, 04 Feb 2018 10:42:46 GMT
Author: msahyoun
Date: Sun Feb  4 10:42:46 2018
New Revision: 1823085

URL: http://svn.apache.org/viewvc?rev=1823085&view=rev
Log:
PDFBOX-4068: rename methods and member to better match intented parameter 

Modified:
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/contentstream/PDAbstractContentStream.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDPageContentStream.java

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/contentstream/PDAbstractContentStream.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/contentstream/PDAbstractContentStream.java?rev=1823085&r1=1823084&r2=1823085&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/contentstream/PDAbstractContentStream.java
(original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/contentstream/PDAbstractContentStream.java
Sun Feb  4 10:42:46 2018
@@ -57,7 +57,7 @@ import org.apache.pdfbox.util.NumberForm
 public abstract class PDAbstractContentStream implements Closeable
 {
     
-    private OutputStream output;
+    private OutputStream outputStream;
     private PDResources resources;
 
     private boolean inTextMode = false;
@@ -87,7 +87,7 @@ public abstract class PDAbstractContentS
      */
     public PDAbstractContentStream(OutputStream outputStream)
     {
-        output = outputStream;
+        this.outputStream = outputStream;
         this.resources = null;
 
         formatDecimal.setMaximumFractionDigits(4);
@@ -105,14 +105,14 @@ public abstract class PDAbstractContentS
         formatDecimal.setMaximumFractionDigits(fractionDigitsNumber);
     }
     
-    public OutputStream getOutput()
+    public OutputStream getOutputStream()
     {
-        return this.output;
+        return outputStream;
     }
 
-    public void setOutput(OutputStream outputStream)
+    public void setOutputStream(OutputStream outputStream)
     {
-        this.output = outputStream;
+        this.outputStream = outputStream;
     }
     
     public PDResources getResources()
@@ -278,7 +278,7 @@ public abstract class PDAbstractContentS
             }
         }
 
-        COSWriter.writeString(font.encode(text), output);
+        COSWriter.writeString(font.encode(text), outputStream);
     }
 
     /**
@@ -1367,9 +1367,9 @@ public abstract class PDAbstractContentS
         {
             throw new IllegalArgumentException("comment should not include a newline");
         }
-        output.write('%');
-        output.write(comment.getBytes(Charsets.US_ASCII));
-        output.write('\n');
+        outputStream.write('%');
+        outputStream.write(comment.getBytes(Charsets.US_ASCII));
+        outputStream.write('\n');
     }
 
     /**
@@ -1388,9 +1388,9 @@ public abstract class PDAbstractContentS
         }
         else
         {
-            output.write(formatBuffer, 0, byteCount);
+            outputStream.write(formatBuffer, 0, byteCount);
         }
-        output.write(' ');
+        outputStream.write(' ');
     }
 
     /**
@@ -1401,7 +1401,7 @@ public abstract class PDAbstractContentS
     protected void writeOperand(int integer) throws IOException
     {
         write(formatDecimal.format(integer));
-        output.write(' ');
+        outputStream.write(' ');
     }
 
     /**
@@ -1411,8 +1411,8 @@ public abstract class PDAbstractContentS
      */
     protected void writeOperand(COSName name) throws IOException
     {
-        name.writePDF(output);
-        output.write(' ');
+        name.writePDF(outputStream);
+        outputStream.write(' ');
     }
 
     /**
@@ -1422,8 +1422,8 @@ public abstract class PDAbstractContentS
      */
     protected void writeOperator(String text) throws IOException
     {
-        output.write(text.getBytes(Charsets.US_ASCII));
-        output.write('\n');
+        outputStream.write(text.getBytes(Charsets.US_ASCII));
+        outputStream.write('\n');
     }
 
     /**
@@ -1433,7 +1433,7 @@ public abstract class PDAbstractContentS
      */
     protected void write(String text) throws IOException
     {
-        output.write(text.getBytes(Charsets.US_ASCII));
+        outputStream.write(text.getBytes(Charsets.US_ASCII));
     }
 
     /**
@@ -1443,7 +1443,7 @@ public abstract class PDAbstractContentS
      */
     protected void write(byte[] data) throws IOException
     {
-        output.write(data);
+        outputStream.write(data);
     }
     
     /**
@@ -1452,7 +1452,7 @@ public abstract class PDAbstractContentS
      */
     protected void writeLine() throws IOException
     {
-        output.write('\n');
+        outputStream.write('\n');
     }
 
     /**
@@ -1462,7 +1462,7 @@ public abstract class PDAbstractContentS
      */
     protected void writeBytes(byte[] data) throws IOException
     {
-        output.write(data);
+        outputStream.write(data);
     }
 
     /**
@@ -1486,7 +1486,7 @@ public abstract class PDAbstractContentS
     @Override
     public void close() throws IOException
     {
-        output.close();
+        outputStream.close();
     }
 
     protected boolean isOutside255Interval(int val)

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDPageContentStream.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDPageContentStream.java?rev=1823085&r1=1823084&r2=1823085&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDPageContentStream.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDPageContentStream.java Sun
Feb  4 10:42:46 2018
@@ -177,7 +177,7 @@ public final class PDPageContentStream e
             {
                 // create a new stream to encapsulate the existing stream
                 PDStream saveGraphics = new PDStream(document);
-                setOutput(saveGraphics.createOutputStream(filter));
+                setOutputStream(saveGraphics.createOutputStream(filter));
                 
                 // save the initial/unmodified graphics context
                 saveGraphicsState();
@@ -189,7 +189,7 @@ public final class PDPageContentStream e
 
             // Sets the compoundStream as page contents
             sourcePage.getCOSObject().setItem(COSName.CONTENTS, array);
-            setOutput(contentsToAppend.createOutputStream(filter));
+            setOutputStream(contentsToAppend.createOutputStream(filter));
 
             // restore the initial/unmodified graphics context
             if (resetContext)
@@ -205,7 +205,7 @@ public final class PDPageContentStream e
             }
             PDStream contents = new PDStream(document);
             sourcePage.setContents(contents);
-            setOutput(contents.createOutputStream(filter));
+            setOutputStream(contents.createOutputStream(filter));
         }
         
         // this has to be done here, as the resources will be set to null when resetting
the content
@@ -323,7 +323,7 @@ public final class PDPageContentStream e
             }
         }
 
-        COSWriter.writeString(font.encode(text), getOutput());
+        COSWriter.writeString(font.encode(text), getOutputStream());
     }
 
     /**



Mime
View raw message