org.sadun.util
Class AutoCRWriter

java.lang.Object
  extended byjava.io.Writer
      extended byorg.sadun.util.AutoCRWriter

public class AutoCRWriter
extends java.io.Writer

A class that automatically intercepts and prints line separators without explicitly needing for println() to be called (behaves as PrintStream rather than PrintWriter.


Field Summary
 
Fields inherited from class java.io.Writer
lock
 
Constructor Summary
AutoCRWriter(java.io.OutputStream out)
           
AutoCRWriter(java.io.Writer out)
           
 
Method Summary
 void close()
           
 void flush()
           
static void main(java.lang.String[] args)
           
 void write(char[] cbuf, int off, int len)
           
 void write(int c)
           
 
Methods inherited from class java.io.Writer
write, write, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AutoCRWriter

public AutoCRWriter(java.io.Writer out)

AutoCRWriter

public AutoCRWriter(java.io.OutputStream out)
Method Detail

write

public void write(int c)
           throws java.io.IOException
Throws:
java.io.IOException

close

public void close()
           throws java.io.IOException
Throws:
java.io.IOException

flush

public void flush()
           throws java.io.IOException
Throws:
java.io.IOException

write

public void write(char[] cbuf,
                  int off,
                  int len)
           throws java.io.IOException
Throws:
java.io.IOException

main

public static void main(java.lang.String[] args)
                 throws java.io.IOException
Throws:
java.io.IOException