Update of /cvsroot/xdoclet/xjavadoc/src/xjavadoc/filesystem
In directory sc8-pr-cvs1:/tmp/cvs-serv20027/src/xjavadoc/filesystem

Modified Files:
        AbstractFile.java ReaderFile.java XJavadocFile.java 
Log Message:
Patch submitted by Takashi Okamoto for alternate source file encodings

Index: AbstractFile.java
===================================================================
RCS file: /cvsroot/xdoclet/xjavadoc/src/xjavadoc/filesystem/AbstractFile.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** AbstractFile.java   24 Feb 2003 13:31:47 -0000      1.3
--- AbstractFile.java   30 Aug 2003 06:23:13 -0000      1.4
***************
*** 6,9 ****
--- 6,10 ----
  
  import java.io.IOException;
+ import java.io.UnsupportedEncodingException;
  import java.io.Writer;
  import java.io.Reader;
***************
*** 60,62 ****
--- 61,69 ----
  
        String getPath();
+ 
+       /**
+        * @param encoding
+        * @return
+        */
+       public Reader getReader(String enc) throws UnsupportedEncodingException, 
FileNotFoundException;
  }

Index: ReaderFile.java
===================================================================
RCS file: /cvsroot/xdoclet/xjavadoc/src/xjavadoc/filesystem/ReaderFile.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** ReaderFile.java     26 Aug 2003 09:48:22 -0000      1.1
--- ReaderFile.java     30 Aug 2003 06:23:13 -0000      1.2
***************
*** 14,17 ****
--- 14,20 ----
  import java.io.FileOutputStream;
  import java.io.FileNotFoundException;
+ import java.io.UnsupportedEncodingException;
+ import java.io.InputStreamReader;
+ import java.io.FileInputStream;
  
  /**
***************
*** 31,34 ****
--- 34,51 ----
                return file;
        }
+ 
+     public Reader getReader(String enc) throws UnsupportedEncodingException, 
FileNotFoundException
+     {
+         // Takashi: what to do here?
+ //        if (enc!=null)
+ //        {
+ //            return new InputStreamReader(new FileInputStream(file),enc);
+ //        }
+ //        else
+ //        {
+ //            return new InputStreamReader(new FileInputStream(file));
+ //        }
+         return file;
+     }
  
        public Writer getWriter() throws IOException

Index: XJavadocFile.java
===================================================================
RCS file: /cvsroot/xdoclet/xjavadoc/src/xjavadoc/filesystem/XJavadocFile.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** XJavadocFile.java   24 Feb 2003 13:31:47 -0000      1.3
--- XJavadocFile.java   30 Aug 2003 06:23:13 -0000      1.4
***************
*** 6,11 ****
--- 6,14 ----
  
  import java.io.File;
+ import java.io.FileInputStream;
+ import java.io.InputStreamReader;
  import java.io.Reader;
  import java.io.IOException;
+ import java.io.UnsupportedEncodingException;
  import java.io.Writer;
  import java.io.FileReader;
***************
*** 30,33 ****
--- 33,49 ----
        {
                return new FileReader( file );
+       }
+ 
+       public Reader getReader(String enc) throws UnsupportedEncodingException, 
FileNotFoundException
+       {
+               if (enc!=null)
+               {
+                       return new InputStreamReader(new FileInputStream(file),enc);
+               } 
+               else 
+               {
+                       return new InputStreamReader(new FileInputStream(file));
+               }
+ 
        }
  



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
xdoclet-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-devel

Reply via email to