/[classpath]/classpath/java/io/PrintWriter.java
ViewVC logotype

Diff of /classpath/java/io/PrintWriter.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.13.2.1 by gnu_andrew, Sat Feb 19 10:50:35 2005 UTC revision 1.13.2.2 by tromey, Wed Apr 20 20:27:38 2005 UTC
# Line 1  Line 1 
1  /* PrintWriter.java -- prints primitive values and objects to a stream as text  /* PrintWriter.java -- prints primitive values and objects to a stream as text
2     Copyright (C) 1998, 1999, 2000, 2001  Free Software Foundation     Copyright (C) 1998, 1999, 2000, 2001, 2005  Free Software Foundation
3    
4  This file is part of GNU Classpath.  This file is part of GNU Classpath.
5    
# Line 138  public class PrintWriter extends Writer Line 138  public class PrintWriter extends Writer
138      this.autoflush = autoflush;      this.autoflush = autoflush;
139    }    }
140    
141      /** @since 1.5 */
142      public PrintWriter(String path)
143        throws FileNotFoundException
144      {
145        this(new OutputStreamWriter(new FileOutputStream(path)));
146      }
147    
148      /** @since 1.5 */
149      public PrintWriter(String path, String encoding)
150        throws FileNotFoundException, UnsupportedEncodingException
151      {
152        this(new OutputStreamWriter(new FileOutputStream(path), encoding));
153      }
154    
155      /** @since 1.5 */
156      public PrintWriter(File path)
157        throws FileNotFoundException
158      {
159        this(new OutputStreamWriter(new FileOutputStream(path)));
160      }
161    
162      /** @since 1.5 */
163      public PrintWriter(File path, String encoding)
164        throws FileNotFoundException, UnsupportedEncodingException
165      {
166        this(new OutputStreamWriter(new FileOutputStream(path), encoding));
167      }
168    
169    /**    /**
170     * This method can be called by subclasses to indicate that an error     * This method can be called by subclasses to indicate that an error
171     * has occurred and should be reported by <code>checkError</code>.     * has occurred and should be reported by <code>checkError</code>.
# Line 567  public class PrintWriter extends Writer Line 595  public class PrintWriter extends Writer
595    {    {
596      write(str, 0, str.length());      write(str, 0, str.length());
597    }      }  
598    
599      /** @since 1.5 */
600      public PrintWriter append(char c)
601      {
602        write(c);
603        return this;
604      }
605    
606      /** @since 1.5 */
607      public PrintWriter append(CharSequence cs)
608      {
609        write(cs == null ? "null" : cs.toString());
610        return this;
611      }
612    
613      /** @since 1.5 */
614      public PrintWriter append(CharSequence cs, int start, int end)
615      {
616        write(cs == null ? "null" : cs.subSequence(start, end).toString());
617        return this;
618      }
619  }  }
620    

Legend:
Removed from v.1.13.2.1  
changed lines
  Added in v.1.13.2.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26