Opens a new buffered Writer for writing to this sink. The returned stream is not required to be a BufferedWriter in order to allow implementations to simply delegate to #openStream() when the stream returned by that method does not benefit from additional buffering. This meth
()
| 77 | * @since 15.0 (in 14.0 with return type {@link BufferedWriter}) |
| 78 | */ |
| 79 | public Writer openBufferedStream() throws IOException { |
| 80 | Writer writer = openStream(); |
| 81 | return (writer instanceof BufferedWriter) |
| 82 | ? (BufferedWriter) writer |
| 83 | : new BufferedWriter(writer); |
| 84 | } |
| 85 | |
| 86 | /** |
| 87 | * Writes the given character sequence to this sink. |