Top Description Fields Constructors Methods
com.sun.codemodel.util

public Class JavadocEscapeWriter

extends FilterWriter
Class Inheritance
Imports
java.io.FilterWriter, .IOException, .Writer

Writer that escapes characters that are unsafe as Javadoc comments. Such characters include '<' and '&'.

Note that this class doesn't escape other Unicode characters that are typically unsafe. For example, 愛 (A kanji that means "love") can be considered as unsafe because javac with English Windows cannot accept this character in the source code.

If the application needs to escape such characters as well, then they are on their own.

Author
Kohsuke Kawaguchi ([email protected])

Field Summary

Inherited from java.io.FilterWriter:
out

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
write(int ch)

Overrides java.io.FilterWriter.write.

Writes a single character.

public void
write(char[] buf, int off, int len)

Overrides java.io.FilterWriter.write.

Writes a portion of an array of characters.

public void
write(char[] buf)

Overrides java.io.Writer.write.

Writes an array of characters.

public void
write(String buf, int off, int len)

Overrides java.io.FilterWriter.write.

Writes a portion of a string.

public void
write(String buf)

Overrides java.io.Writer.write.

Writes a string.

Inherited from java.io.FilterWriter:
closeflush

Constructor Detail

JavadocEscapeWriterback to summary
public JavadocEscapeWriter(Writer next)

Method Detail

writeback to summary
public void write(int ch) throws IOException

Overrides java.io.FilterWriter.write.

Doc from java.io.FilterWriter.write.

Writes a single character.

Annotations
@Override
Exceptions
IOException:
If an I/O error occurs
writeback to summary
public void write(char[] buf, int off, int len) throws IOException

Overrides java.io.FilterWriter.write.

Doc from java.io.FilterWriter.write.

Writes a portion of an array of characters.

Annotations
@Override
Exceptions
IOException:
If an I/O error occurs
writeback to summary
public void write(char[] buf) throws IOException

Overrides java.io.Writer.write.

Doc from java.io.Writer.write.

Writes an array of characters.

Annotations
@Override
Exceptions
IOException:
If an I/O error occurs
writeback to summary
public void write(String buf, int off, int len) throws IOException

Overrides java.io.FilterWriter.write.

Doc from java.io.FilterWriter.write.

Writes a portion of a string.

Annotations
@Override
Exceptions
IOException:
If an I/O error occurs
writeback to summary
public void write(String buf) throws IOException

Overrides java.io.Writer.write.

Doc from java.io.Writer.write.

Writes a string.

Annotations
@Override
Exceptions
IOException:
If an I/O error occurs