com.ccg.macros
Class OutputWriter

java.lang.Object
  extended by com.ccg.macros.OutputWriter
All Implemented Interfaces:
Output

public class OutputWriter
extends Object
implements Output

Describe...

 class Example {
   public void main(String[] args) {
     com.ccg.macros.OutputWriter o = new com.ccg.macros.OutputWriter();
          System.out.println(o);
   }
 }
 

Since:
1.0
Version:
$Revision: 1.1.1.1 $
Author:
$Author: pkb $
See Also:
Output

Constructor Summary
OutputWriter(File f)
           
OutputWriter(OutputStream out)
          Create a Output object which uses a OutputStream to write the results of interpretation to.
OutputWriter(Writer out)
          Create a Output object which uses a Writer to write the results of interpretation to.
 
Method Summary
 void close()
           
 void flush()
           
 void write(char[] buf, int ofs, int len)
          Writes a set of characters from a buffer to the output.
 void write(Object o)
          Outputs the string representation of a Object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OutputWriter

public OutputWriter(Writer out)
Create a Output object which uses a Writer to write the results of interpretation to.

Parameters:
out - Writer to write interpretted results to.
Since:
1.0

OutputWriter

public OutputWriter(OutputStream out)
Create a Output object which uses a OutputStream to write the results of interpretation to.

Parameters:
out - Output stream to write interpretted results to.
Since:
1.0

OutputWriter

public OutputWriter(File f)
             throws IOException
Throws:
IOException
Method Detail

close

public void close()
           throws IOException
Throws:
IOException

flush

public void flush()
           throws IOException
Throws:
IOException

write

public void write(char[] buf,
                  int ofs,
                  int len)
           throws IOException
Writes a set of characters from a buffer to the output. This method is used by macro processors (such as the AtMacros class) to send a set of characters to the output device (string, file, etc).

Specified by:
write in interface Output
Parameters:
buf - A character array to take the data from (must not be null)
ofs - Offset into the buffer to the first character to start the copy from. Should be in the range of [0,buf.length-1].
len - How many characters to copy. When added to the offset, the resulting value should not exceed the length of the array.
Throws:
IOException - If a I/O error is encountered.
Since:
1.0

write

public void write(Object o)
           throws IOException
Outputs the string representation of a Object. This method is used by macro processors (such as the AtMacros class) to cause the string representation of a Object to be sent to the output device.

Specified by:
write in interface Output
Parameters:
object - The object to write out (the toString() method is used to write out the string representation of the object). You may pass null (in which case nothing will be done).
Throws:
IOException - If a I/O error is encountered.
Since:
1.0


Copyright 1998-1998-2006 null. All Rights Reserved.