Package org.apache.juneau.common.utils
Class PathReaderBuilder
java.lang.Object
org.apache.juneau.common.utils.PathReaderBuilder
- Since:
- 9.1.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionIf called and the path isnull or non-existent, then thebuild()
command will return an empty reader instead of aIOException
.build()
Creates a new File reader.Sets the character encoding of the path.Sets the character encoding of the path.static PathReaderBuilder
create()
Creates a new builder.static PathReaderBuilder
Creates a new builder initialized with the specified path.Sets the path of the path being written from.Sets the path being written from.
-
Constructor Details
-
PathReaderBuilder
public PathReaderBuilder()
-
-
Method Details
-
create
Creates a new builder.- Returns:
- A new builder.
-
create
Creates a new builder initialized with the specified path.- Parameters:
path
- The path being written to.- Returns:
- A new builder.
-
allowNoFile
If called and the path isnull or non-existent, then thebuild()
command will return an empty reader instead of aIOException
.- Returns:
- This object.
-
build
Creates a new File reader.- Returns:
- A new File reader.
- Throws:
IOException
- if an I/O error occurs opening the path
-
charset
Sets the character encoding of the path.- Parameters:
charset
- The character encoding. The default isCharset.defaultCharset()
. Null resets to the default.- Returns:
- This object.
-
charset
Sets the character encoding of the path.- Parameters:
charset
- The character encoding. The default isCharset.defaultCharset()
. Null resets to the default.- Returns:
- This object.
-
path
Sets the path being written from.- Parameters:
path
- The path being written from.- Returns:
- This object.
-
path
Sets the path of the path being written from.- Parameters:
path
- The path of the path being written from.- Returns:
- This object.
-