pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1672448 - in /pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/filter: ASCIIHexFilter.java CCITTFaxFilter.java DCTFilter.java Filter.java FlateFilter.java LZWFilter.java
Date Thu, 09 Apr 2015 18:50:21 GMT
Author: tilman
Date: Thu Apr  9 18:50:20 2015
New Revision: 1672448

URL: http://svn.apache.org/r1672448
Log:
PDFBOX-2576: revert "make methods static" changes due to lack of consensus

Modified:
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/filter/ASCIIHexFilter.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/filter/CCITTFaxFilter.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/filter/DCTFilter.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/filter/Filter.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/filter/FlateFilter.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/filter/LZWFilter.java

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/filter/ASCIIHexFilter.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/filter/ASCIIHexFilter.java?rev=1672448&r1=1672447&r2=1672448&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/filter/ASCIIHexFilter.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/filter/ASCIIHexFilter.java Thu Apr
 9 18:50:20 2015
@@ -99,12 +99,12 @@ final class ASCIIHexFilter extends Filte
     //  12  0x0C  Form feed (FF)
     //  13  0x0D  Carriage return (CR)
     //  32  0x20  Space (SP)
-    private static boolean isWhitespace(int c)
+    private boolean isWhitespace(int c)
     {
         return c == 0 || c == 9 || c == 10 || c == 12 || c == 13 || c == 32;
     }
 
-    private static boolean isEOD(int c)
+    private boolean isEOD(int c)
     {
         return c == '>';
     }

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/filter/CCITTFaxFilter.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/filter/CCITTFaxFilter.java?rev=1672448&r1=1672447&r2=1672448&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/filter/CCITTFaxFilter.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/filter/CCITTFaxFilter.java Thu Apr
 9 18:50:20 2015
@@ -115,7 +115,7 @@ final class CCITTFaxFilter extends Filte
         return new DecodeResult(parameters);
     }
 
-    private static void invertBitmap(byte[] bufferData)
+    private void invertBitmap(byte[] bufferData)
     {
         for (int i = 0, c = bufferData.length; i < c; i++)
         {

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/filter/DCTFilter.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/filter/DCTFilter.java?rev=1672448&r1=1672447&r2=1672448&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/filter/DCTFilter.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/filter/DCTFilter.java Thu Apr  9 18:50:20
2015
@@ -185,7 +185,7 @@ final class DCTFilter extends Filter
     }
 
     // reads the APP14 Adobe transform tag and returns its value, or 0 if unknown
-    private static Integer getAdobeTransform(IIOMetadata metadata)
+    private Integer getAdobeTransform(IIOMetadata metadata)
     {
         Element tree = (Element)metadata.getAsTree("javax_imageio_jpeg_image_1.0");
         Element markerSequence = (Element)tree.getElementsByTagName("markerSequence").item(0);
@@ -201,7 +201,7 @@ final class DCTFilter extends Filter
     // converts YCCK image to CMYK. YCCK is an equivalent encoding for
     // CMYK data, so no color management code is needed here, nor does the
     // PDF color space have to be consulted
-    private static WritableRaster fromYCCKtoCMYK(Raster raster)
+    private WritableRaster fromYCCKtoCMYK(Raster raster)
     {
         WritableRaster writableRaster = raster.createCompatibleWritableRaster();
 
@@ -240,7 +240,7 @@ final class DCTFilter extends Filter
     }
 
     // converts from BGR to RGB
-    private static WritableRaster fromBGRtoRGB(Raster raster)
+    private WritableRaster fromBGRtoRGB(Raster raster)
     {
         WritableRaster writableRaster = raster.createCompatibleWritableRaster();
 
@@ -264,7 +264,7 @@ final class DCTFilter extends Filter
     }
     
     // returns the number of channels as a string, or an empty string if there is an error
getting the meta data
-    private static String getNumChannels(ImageReader reader)
+    private String getNumChannels(ImageReader reader)
     {
         try
         {
@@ -288,7 +288,7 @@ final class DCTFilter extends Filter
     }    
 
     // clamps value to 0-255 range
-    private static int clamp(float value)
+    private int clamp(float value)
     {
         return (int)((value < 0) ? 0 : ((value > 255) ? 255 : value));
     }

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/filter/Filter.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/filter/Filter.java?rev=1672448&r1=1672447&r2=1672448&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/filter/Filter.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/filter/Filter.java Thu Apr  9 18:50:20
2015
@@ -77,7 +77,7 @@ public abstract class Filter
 
     // gets the decode params for a specific filter index, this is used to
     // normalise the DecodeParams entry so that it is always a dictionary
-    protected static COSDictionary getDecodeParams(COSDictionary dictionary, int index)
+    protected COSDictionary getDecodeParams(COSDictionary dictionary, int index)
     {
         COSBase obj = dictionary.getDictionaryObject(COSName.DECODE_PARMS, COSName.DP);
         if (obj instanceof COSDictionary)

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/filter/FlateFilter.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/filter/FlateFilter.java?rev=1672448&r1=1672447&r2=1672448&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/filter/FlateFilter.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/filter/FlateFilter.java Thu Apr  9
18:50:20 2015
@@ -87,7 +87,7 @@ final class FlateFilter extends Filter
 
     // Use Inflater instead of InflateInputStream to avoid an EOFException due to a probably
     // missing Z_STREAM_END, see PDFBOX-1232 for details
-    private static void decompress(InputStream in, OutputStream out) throws IOException,
DataFormatException 
+    private void decompress(InputStream in, OutputStream out) throws IOException, DataFormatException

     { 
         byte[] buf = new byte[2048]; 
         int read = in.read(buf); 

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/filter/LZWFilter.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/filter/LZWFilter.java?rev=1672448&r1=1672447&r2=1672448&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/filter/LZWFilter.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/filter/LZWFilter.java Thu Apr  9 18:50:20
2015
@@ -101,7 +101,7 @@ public class LZWFilter extends Filter
         return new DecodeResult(parameters);
     }
 
-    private static void doLZWDecode(InputStream encoded, OutputStream decoded, int earlyChange)
throws IOException
+    private void doLZWDecode(InputStream encoded, OutputStream decoded, int earlyChange)
throws IOException
     {
         List<byte[]> codeTable = new ArrayList<byte[]>();
         int chunk = 9;
@@ -238,7 +238,7 @@ public class LZWFilter extends Filter
      * @return The index of the longest matching pattern or -1 if nothing is
      * found.
      */
-    private static int findPatternCode(List<byte[]> codeTable, byte[] pattern)
+    private int findPatternCode(List<byte[]> codeTable, byte[] pattern)
     {
         int foundCode = -1;
         int foundLen = 0;
@@ -272,7 +272,7 @@ public class LZWFilter extends Filter
      * Init the code table with 1 byte entries and the EOD and CLEAR_TABLE
      * markers.
      */
-    private static List<byte[]> createCodeTable()
+    private List<byte[]> createCodeTable()
     {
         List<byte[]> codeTable = new ArrayList<byte[]>(4096);
         for (int i = 0; i < 256; ++i)
@@ -292,7 +292,7 @@ public class LZWFilter extends Filter
      *
      * @return a value between 9 and 12
      */
-    private static int calculateChunk(int tabSize, int earlyChange)
+    private int calculateChunk(int tabSize, int earlyChange)
     {
         if (tabSize >= 2048 - earlyChange)
         {



Mime
View raw message