Package com.xebialabs.license.generator
Class LineBreakingOutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- com.xebialabs.license.generator.LineBreakingOutputStream
-
- All Implemented Interfaces:
java.io.Closeable,java.io.Flushable,java.lang.AutoCloseable
public class LineBreakingOutputStream extends java.io.OutputStreamWrapOutputStreamand insert line breaks while writing. Does not close the wrappedOutputStream.
-
-
Constructor Summary
Constructors Constructor Description LineBreakingOutputStream(java.io.OutputStream toWrap)WrapOutputStreamand insert line breaks every 80 characters.LineBreakingOutputStream(java.io.OutputStream toWrap, int maxWidth, java.lang.String lineSeparator)WrapOutputStreamand insert lineSeparator every maxWidth characters.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidflush()voidwrite(int b)
-
-
-
Constructor Detail
-
LineBreakingOutputStream
public LineBreakingOutputStream(java.io.OutputStream toWrap)
WrapOutputStreamand insert line breaks every 80 characters. Does not close the wrappedOutputStream.
-
LineBreakingOutputStream
public LineBreakingOutputStream(java.io.OutputStream toWrap, int maxWidth, java.lang.String lineSeparator)WrapOutputStreamand insert lineSeparator every maxWidth characters. Does not close the wrappedOutputStream.
-
-
Method Detail
-
write
public void write(int b) throws java.io.IOException- Specified by:
writein classjava.io.OutputStream- Throws:
java.io.IOException
-
flush
public void flush() throws java.io.IOException- Specified by:
flushin interfacejava.io.Flushable- Overrides:
flushin classjava.io.OutputStream- Throws:
java.io.IOException
-
-