Package org.apache.juneau.rest.util
Class FinishablePrintWriter
java.lang.Object
java.io.Writer
java.io.PrintWriter
org.apache.juneau.rest.util.FinishablePrintWriter
- All Implemented Interfaces:
Closeable
,Flushable
,Appendable
,AutoCloseable
,Finishable
-
Field Summary
Fields inherited from class java.io.PrintWriter
out
-
Constructor Summary
ConstructorDescriptionFinishablePrintWriter
(OutputStream out, String characterEncoding, boolean autoFlush) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
finish()
CallsFinishable.finish()
on the underlying output stream.Methods inherited from class java.io.PrintWriter
append, append, append, checkError, clearError, close, flush, format, format, print, print, print, print, print, print, print, print, print, printf, printf, println, println, println, println, println, println, println, println, println, println, setError, write, write, write, write, write
Methods inherited from class java.io.Writer
nullWriter
-
Constructor Details
-
FinishablePrintWriter
public FinishablePrintWriter(OutputStream out, String characterEncoding, boolean autoFlush) throws IOException Constructor.- Parameters:
out
- The wrapped output stream.characterEncoding
- The character encoding of the output stream.autoFlush
- Automatically flush after every println.- Throws:
IOException
- Thrown by underlying stream.
-
-
Method Details
-
finish
CallsFinishable.finish()
on the underlying output stream.A no-op if the underlying output stream does not implement the
Finishable
interface.- Specified by:
finish
in interfaceFinishable
- Throws:
IOException
- Thrown by underlying stream.
-