CRLF Print Writer : Text Read Write « File Input Output « Java

Java
1. 2D Graphics GUI
2. 3D
3. Advanced Graphics
4. Ant
5. Apache Common
6. Chart
7. Class
8. Collections Data Structure
9. Data Type
10. Database SQL JDBC
11. Design Pattern
12. Development Class
13. EJB3
14. Email
15. Event
16. File Input Output
17. Game
18. Generics
19. GWT
20. Hibernate
21. I18N
22. J2EE
23. J2ME
24. JDK 6
25. JNDI LDAP
26. JPA
27. JSP
28. JSTL
29. Language Basics
30. Network Protocol
31. PDF RTF
32. Reflection
33. Regular Expressions
34. Scripting
35. Security
36. Servlets
37. Spring
38. Swing Components
39. Swing JFC
40. SWT JFace Eclipse
41. Threads
42. Tiny Application
43. Velocity
44. Web Services SOA
45. XML
Java Tutorial
Java Source Code / Java Documentation
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java » File Input Output » Text Read WriteScreenshots 
CRLF Print Writer
     


/* -----------------------------------------------------------
 * nntp//rss - a bridge between the RSS world and NNTP clients
 * Copyright (c) 2002, 2003 Jason Brome.  All Rights Reserved.
 *
 * email: nntprss@methodize.org
 * mail:  Methodize Solutions
 *        PO Box 3865
 *        Grand Central Station
 *        New York NY 10163
 
 * This file is part of nntp//rss
 
 * nntp//rss is free software; you can redistribute it 
 * and/or modify it under the terms of the GNU General 
 * Public License as published by the Free Software Foundation; 
 * either version 2 of the License, or (at your option) any 
 * later version.
 *
 * This program is distributed in the hope that it will be 
 * useful, but WITHOUT ANY WARRANTY; without even the implied 
 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
 * PURPOSE.  See the GNU General Public License for more 
 * details.
 *
 * You should have received a copy of the GNU General Public 
 * License along with this program; if not, write to the 
 * Free Software Foundation, Inc., 59 Temple Place, Suite 330, 
 * Boston, MA  02111-1307  USA
 * ----------------------------------------------------- */

import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.Writer;

/**
 
 * Wrapper class - used for output writer in NNTP communications
 * All lines must end in CR/LF - if println is used in
 * standard PrintWriter implementation, platform specific
 * line termination will be used - e.g. \r\n *or* \n
 
 @author Jason Brome <jason@methodize.org>
 @version $Id: CRLFPrintWriter.java,v 1.3 2003/01/22 05:11:23 jasonbrome Exp $
 */
public class CRLFPrintWriter extends PrintWriter {
  
  private static final String CRLF = "\r\n";
  
  public CRLFPrintWriter(OutputStream out) {
    super(out);
  }
  
  public CRLFPrintWriter(OutputStream out, boolean autoFlush) {
    super(out, autoFlush);
  }

  public CRLFPrintWriter(Writer out) {
    super(out);
  }
  
  public CRLFPrintWriter(Writer out, boolean autoFlush) {
    super(out, autoFlush);
  }
  
  

  /**
   @see java.io.PrintWriter#println()
   */
  public void println() {
    super.print(CRLF);
  }

  /**
   @see java.io.PrintWriter#println(boolean)
   */
  public void println(boolean arg0) {
    super.print(arg0);
    println();
  }

  /**
   @see java.io.PrintWriter#println(char)
   */
  public void println(char arg0) {
    super.print(arg0);
    println();
  }

  /**
   @see java.io.PrintWriter#println(char[])
   */
  public void println(char[] arg0) {
    super.print(arg0);
    println();
  }

  /**
   @see java.io.PrintWriter#println(double)
   */
  public void println(double arg0) {
    super.print(arg0);
    println();
  }

  /**
   @see java.io.PrintWriter#println(float)
   */
  public void println(float arg0) {
    super.print(arg0);
    println();
  }

  /**
   @see java.io.PrintWriter#println(int)
   */
  public void println(int arg0) {
    super.print(arg0);
    println();
  }

  /**
   @see java.io.PrintWriter#println(long)
   */
  public void println(long arg0) {
    super.print(arg0);
    println();
  }

  /**
   @see java.io.PrintWriter#println(Object)
   */
  public void println(Object arg0) {
    super.print(arg0);
    println();
  }

  /**
   @see java.io.PrintWriter#println(String)
   */
  public void println(String arg0) {
    super.print(arg0);
    println();
  }

}

   
    
    
    
    
  
Related examples in the same category
1. Data Text Writer
2. Load File As Text
3. Load file content to List
4. Load file line by line
5. Java File Generator
6. Writing delimited text data to a file or a stream
7. Searches case sensitively in a file
8. To Hex String and char
9. CRLF Terminated Reader
10. Find a pattern within a file
11. Gets the content from a File as String Array List
12. Dump a String to a text file with encoding.
13. Load a text file contents as a String.
14. An iterator that breaks text into lines. The result is equal to BufferedReader.readLine().
15. Compare text file line by lineCompare text file line by line
16. Read and return the entire contents of the supplied File.
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.