DCT Lightfoot v3 API specification

java.io
Class Writer

java.lang.Object
  |
  +--java.io.Writer
Direct Known Subclasses:
OutputStreamWriter

public abstract class Writer
extends Object

Class for writing to character streams


Field Summary
protected  Object lock
          The lock object
 
Constructor Summary
protected Writer()
          create the writer that locks on itself
protected Writer(Object lock)
          create a writer that locks on the requested object
 
Method Summary
abstract  void close()
          Close the stream
abstract  void flush()
          Flush the buffer
 void write(char[] cbuf)
          Write a character array
abstract  void write(char[] cbuf, int off, int len)
          Write a portion of a character array
 void write(int c)
          Write a character
 void write(java.lang.String str)
          Write a string to the stream
 void write(java.lang.String str, int off, int len)
          Write a number of characters from a string to the stream
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

lock

protected Object lock
The lock object

Constructor Detail

Writer

protected Writer()
create the writer that locks on itself


Writer

protected Writer(Object lock)
create a writer that locks on the requested object

Parameters:
lock - The lock to use
Method Detail

write

public void write(int c)
           throws IOException
Write a character

Parameters:
c - The character to write - only use the low 16 bits
Throws:
IOException - if there is an IO error

write

public void write(char[] cbuf)
           throws IOException
Write a character array

Parameters:
cbuf - The buffer to write
Throws:
IOException - if there is a problem

write

public abstract void write(char[] cbuf,
                           int off,
                           int len)
                    throws IOException
Write a portion of a character array

Parameters:
cbuf - The buffer to write
off - The offset into the buffer
len - The number of characters to write
Throws:
IOException - if there is an IO error

write

public void write(java.lang.String str)
           throws IOException
Write a string to the stream

Parameters:
str - The string
Throws:
IOException - if there is an IO error

write

public void write(java.lang.String str,
                  int off,
                  int len)
           throws IOException
Write a number of characters from a string to the stream

Parameters:
str - The string
off - The offset into the string
len - The length of the string
Throws:
IOException - if there is an IO error

flush

public abstract void flush()
                    throws IOException
Flush the buffer

Throws:
IOException - if there is an IO error

close

public abstract void close()
                    throws IOException
Close the stream

Throws:
IOException - if there is an IO error

DCT Lightfoot v3 API specification

DCT Lightfoot v3 API specification