public class ContentWriterBuilder extends Object
ContentWriter.| Modifier and Type | Method and Description |
|---|---|
ContentWriter |
build()
Creates the
ContentWriter. |
static ContentWriterBuilder |
of(Path path)
Creates a new builder.
|
ContentWriterBuilder |
setAppend(boolean append)
Indicates whether or not the content should be appended to any previous content already written.
|
ContentWriterBuilder |
setEncoding(String encoding)
Set the encoding of for the content.
|
public static ContentWriterBuilder of(Path path)
path - the path where the content should be written to, cannot be nullpublic ContentWriterBuilder setEncoding(String encoding)
Charset a default encoding of
StandardCharsets.UTF_8 will be used.encoding - the encoding to usepublic ContentWriterBuilder setAppend(boolean append)
true.append - false if the created writer should overwrite previously written content, otherwise
truepublic ContentWriter build() throws IOException
ContentWriter.IOException - if a failure creating the writer occursCopyright © 2025 JBoss by Red Hat. All rights reserved.