Package it.tidalwave.role.io.spi
Class PathTextReadable
- java.lang.Object
-
- it.tidalwave.role.io.spi.PathTextReadable
-
- All Implemented Interfaces:
TextReadable
public class PathTextReadable extends java.lang.Object implements TextReadable
An implementation ofTextReadable
which delegates to aPath
.- Since:
- 3.2-ALPHA-12
- Author:
- Fabrizio Giudici
- Status: stable API
-
-
Field Summary
-
Fields inherited from interface it.tidalwave.role.io.TextReadable
_TextReadable_, DEFAULT
-
-
Constructor Summary
Constructors Constructor Description PathTextReadable(java.nio.file.Path path)
Creates an instance with the given path and options.PathTextReadable(java.nio.file.Path path, java.nio.charset.Charset charset)
Creates an instance with the given path and options.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.io.Reader
openReader()
Returns aReader
to read from the object.
-
-
-
Constructor Detail
-
PathTextReadable
public PathTextReadable(@Nonnull java.nio.file.Path path)
Creates an instance with the given path and options.- Parameters:
path
- the path to open
-
PathTextReadable
public PathTextReadable(@Nonnull java.nio.file.Path path, @Nonnull java.nio.charset.Charset charset)
Creates an instance with the given path and options.- Parameters:
path
- the path to opencharset
- the character set
-
-
Method Detail
-
openReader
@Nonnull public java.io.Reader openReader() throws java.io.IOException
Returns aReader
to read from the object.- Specified by:
openReader
in interfaceTextReadable
- Returns:
- the
Reader
- Throws:
java.io.IOException
- if the operation can't be performed
-
-