Package org.apache.maven.doxia.util
Class LineBreaker
- java.lang.Object
-
- org.apache.maven.doxia.util.LineBreaker
-
@Deprecated public class LineBreaker extends java.lang.ObjectDeprecated.no longer used by Doxia and scheduled for removal in 2.3.0. It also swallows every write failure, so a failing writer would produce a silently truncated file.Allows to specify the line-length of an output writer.
-
-
Field Summary
Fields Modifier and Type Field Description static intDEFAULT_MAX_LINE_LENGTHDeprecated.The default maximal line length.
-
Constructor Summary
Constructors Constructor Description LineBreaker(java.io.Writer out)Deprecated.Constructs a new LineBreaker with DEFAULT_MAX_LINE_LENGTH.LineBreaker(java.io.Writer out, int max)Deprecated.Constructs a new LineBreaker with the given max line length.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidclose()Deprecated.Close the writer.voidflush()Deprecated.Write out the current StringBuilder and flush the writer.java.io.WritergetDestination()Deprecated.Returns the current destination writer.voidwrite(java.lang.String text)Deprecated.Writes the given text to the writer.voidwrite(java.lang.String text, boolean preserveSpace)Deprecated.Writes the given text to the writer.
-
-
-
Field Detail
-
DEFAULT_MAX_LINE_LENGTH
public static final int DEFAULT_MAX_LINE_LENGTH
Deprecated.The default maximal line length.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
LineBreaker
public LineBreaker(java.io.Writer out)
Deprecated.Constructs a new LineBreaker with DEFAULT_MAX_LINE_LENGTH.- Parameters:
out- The writer to use.
-
LineBreaker
public LineBreaker(java.io.Writer out, int max)Deprecated.Constructs a new LineBreaker with the given max line length.- Parameters:
out- The writer to use.max- The maximal line length.
-
-
Method Detail
-
getDestination
public java.io.Writer getDestination()
Deprecated.Returns the current destination writer.- Returns:
- The destination.
-
write
public void write(java.lang.String text) throws java.io.IOExceptionDeprecated.Writes the given text to the writer. White space is not preserved.- Parameters:
text- The text to write.- Throws:
java.io.IOException- if there's a problem writing the text.
-
write
public void write(java.lang.String text, boolean preserveSpace)Deprecated.Writes the given text to the writer.- Parameters:
text- The text to write.preserveSpace- True to preserve white space.
-
flush
public void flush()
Deprecated.Write out the current StringBuilder and flush the writer. Any IOException will be swallowed.
-
close
public void close()
Deprecated.Close the writer.
-
-