soot.util
Class EscapedWriter

java.lang.Object
  extended by java.io.Writer
      extended by java.io.FilterWriter
          extended by soot.util.EscapedWriter
All Implemented Interfaces:
Closeable, Flushable, Appendable

public class EscapedWriter
extends FilterWriter

A FilterWriter which catches to-be-escaped characters (\\unnnn) in the input and substitutes their escaped representation. Used for Soot output.


Field Summary
 String lineSeparator
          Convenience field containing the system's line separator.
 
Fields inherited from class java.io.FilterWriter
out
 
Fields inherited from class java.io.Writer
lock
 
Constructor Summary
EscapedWriter(Writer fos)
          Constructs an EscapedWriter around the given Writer.
 
Method Summary
 void print(int ch)
          Print a single character (unsupported).
 void write(int ch)
          Write a single character.
 void write(String s, int off, int len)
          Write a segment of the given String.
 
Methods inherited from class java.io.FilterWriter
close, flush, write
 
Methods inherited from class java.io.Writer
append, append, append, write, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

lineSeparator

public final String lineSeparator
Convenience field containing the system's line separator.

Constructor Detail

EscapedWriter

public EscapedWriter(Writer fos)
Constructs an EscapedWriter around the given Writer.

Method Detail

print

public void print(int ch)
           throws IOException
Print a single character (unsupported).

Throws:
IOException

write

public void write(String s,
                  int off,
                  int len)
           throws IOException
Write a segment of the given String.

Overrides:
write in class FilterWriter
Throws:
IOException

write

public void write(int ch)
           throws IOException
Write a single character.

Overrides:
write in class FilterWriter
Throws:
IOException