< prev index next >

src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/wscompile/FilerCodeWriter.java

Print this page

        

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.  Oracle designates this

@@ -23,34 +23,39 @@
  * questions.
  */
 
 package com.sun.tools.internal.ws.wscompile;
 
+import com.sun.codemodel.internal.CodeWriter;
 import com.sun.codemodel.internal.JPackage;
 
 import javax.annotation.processing.Filer;
-import java.io.File;
 import java.io.IOException;
+import java.io.OutputStream;
 import java.io.Writer;
 
 /**
  * Writes all the source files using the specified Filer.
  *
  * @author WS Development Team
  */
-public class FilerCodeWriter extends WSCodeWriter {
+public class FilerCodeWriter extends CodeWriter {
 
     /** The Filer used to create files. */
     private final Filer filer;
 
     private Writer w;
 
-    public FilerCodeWriter(File outDir, Options options) throws IOException {
-        super(outDir, options);
+    public FilerCodeWriter(Options options) throws IOException {
         this.filer = options.filer;
     }
 
+    @Override
+    public OutputStream openBinary(JPackage pkg, String fileName) throws IOException {
+        throw new UnsupportedOperationException("Not supported.");
+    }
+
     public Writer openSource(JPackage pkg, String fileName) throws IOException {
         String tmp = fileName.substring(0, fileName.length()-5);
         if (pkg.name() != null && ! "".equals(pkg.name())) {
                 w = filer.createSourceFile(pkg.name() + "." + tmp).openWriter();
         } else {

@@ -59,11 +64,10 @@
         return w;
     }
 
 
     public void close() throws IOException {
-        super.close();
         if (w != null)
             w.close();
         w = null;
     }
 }
< prev index next >