commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brit...@apache.org
Subject svn commit: r1649364 - in /commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/pnm: PamWriter.java PbmWriter.java PgmWriter.java PnmWriter.java PpmWriter.java
Date Sun, 04 Jan 2015 17:11:03 GMT
Author: britter
Date: Sun Jan  4 17:11:02 2015
New Revision: 1649364

URL: http://svn.apache.org/r1649364
Log:
PnmWriter really is an interface

Modified:
    commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/pnm/PamWriter.java
    commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/pnm/PbmWriter.java
    commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/pnm/PgmWriter.java
    commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/pnm/PnmWriter.java
    commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/pnm/PpmWriter.java

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/pnm/PamWriter.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/pnm/PamWriter.java?rev=1649364&r1=1649363&r2=1649364&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/pnm/PamWriter.java
(original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/pnm/PamWriter.java
Sun Jan  4 17:11:02 2015
@@ -24,12 +24,8 @@ import java.util.Map;
 
 import org.apache.commons.imaging.ImageWriteException;
 
-class PamWriter extends PnmWriter {
-    public PamWriter() {
-        super(true);
-    }
-    
-    @Override
+class PamWriter implements PnmWriter {
+
     public void writeImage(final BufferedImage src, final OutputStream os,
             final Map<String, Object> params) throws ImageWriteException, IOException
{
 

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/pnm/PbmWriter.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/pnm/PbmWriter.java?rev=1649364&r1=1649363&r2=1649364&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/pnm/PbmWriter.java
(original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/pnm/PbmWriter.java
Sun Jan  4 17:11:02 2015
@@ -23,12 +23,14 @@ import java.util.Map;
 
 import org.apache.commons.imaging.ImageWriteException;
 
-class PbmWriter extends PnmWriter {
+class PbmWriter implements PnmWriter {
+
+    private boolean rawbits;
+
     public PbmWriter(final boolean rawbits) {
-        super(rawbits);
+        this.rawbits = rawbits;
     }
 
-    @Override
     public void writeImage(final BufferedImage src, final OutputStream os, final Map<String,
Object> params)
             throws ImageWriteException, IOException {
         os.write(PnmConstants.PNM_PREFIX_BYTE);

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/pnm/PgmWriter.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/pnm/PgmWriter.java?rev=1649364&r1=1649363&r2=1649364&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/pnm/PgmWriter.java
(original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/pnm/PgmWriter.java
Sun Jan  4 17:11:02 2015
@@ -23,13 +23,14 @@ import java.util.Map;
 
 import org.apache.commons.imaging.ImageWriteException;
 
-class PgmWriter extends PnmWriter {
+class PgmWriter implements PnmWriter {
+
+    private boolean rawbits;
 
     public PgmWriter(boolean rawbits) {
-        super(rawbits);
+        this.rawbits = rawbits;
     }
 
-    @Override
     public void writeImage(final BufferedImage src, final OutputStream os, final Map<String,
Object> params)
             throws ImageWriteException, IOException {
         // System.out.println

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/pnm/PnmWriter.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/pnm/PnmWriter.java?rev=1649364&r1=1649363&r2=1649364&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/pnm/PnmWriter.java
(original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/pnm/PnmWriter.java
Sun Jan  4 17:11:02 2015
@@ -23,13 +23,9 @@ import java.util.Map;
 
 import org.apache.commons.imaging.ImageWriteException;
 
-abstract class PnmWriter {
-    protected final boolean rawbits;
+interface PnmWriter {
 
-    public PnmWriter(final boolean rawbits) {
-        this.rawbits = rawbits;
-    }
-
-    public abstract void writeImage(BufferedImage src, OutputStream os,
+    void writeImage(BufferedImage src, OutputStream os,
             Map<String, Object> params) throws ImageWriteException, IOException;
+
 }

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/pnm/PpmWriter.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/pnm/PpmWriter.java?rev=1649364&r1=1649363&r2=1649364&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/pnm/PpmWriter.java
(original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/pnm/PpmWriter.java
Sun Jan  4 17:11:02 2015
@@ -23,10 +23,12 @@ import java.util.Map;
 
 import org.apache.commons.imaging.ImageWriteException;
 
-class PpmWriter extends PnmWriter {
+class PpmWriter implements PnmWriter {
+
+    private boolean rawbits;
 
     public PpmWriter(boolean rawbits) {
-        super(rawbits);
+        this.rawbits = rawbits;
     }
 
     @Override



Mime
View raw message