Package it.tidalwave.role.io.spi
Class PathTextWritable
- java.lang.Object
-
- it.tidalwave.role.io.spi.PathTextWritable
-
- All Implemented Interfaces:
TextWritable
public class PathTextWritable extends java.lang.Object implements TextWritable
An implementation ofTextWritablewhich delegates to aPath.- Since:
- 3.2-ALPHA-12
- Author:
- Fabrizio Giudici
- Status: stable API
-
-
Field Summary
-
Fields inherited from interface it.tidalwave.role.io.TextWritable
_TextWritable_, DEFAULT
-
-
Constructor Summary
Constructors Constructor Description PathTextWritable(java.nio.file.Path path)Creates an instance with the given path and options.PathTextWritable(java.nio.file.Path path, java.nio.charset.Charset charset, java.nio.file.OpenOption... openOptions)Creates an instance with the given path and options.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.io.WriteropenWriter()Returns aWriterto write into the object.
-
-
-
Constructor Detail
-
PathTextWritable
public PathTextWritable(@Nonnull java.nio.file.Path path)Creates an instance with the given path and options.- Parameters:
path- the path to open
-
PathTextWritable
public PathTextWritable(@Nonnull java.nio.file.Path path, @Nonnull java.nio.charset.Charset charset, @Nonnull java.nio.file.OpenOption... openOptions)Creates an instance with the given path and options.- Parameters:
path- the path to opencharset- the character setopenOptions- open options
-
-
Method Detail
-
openWriter
@Nonnull public java.io.Writer openWriter() throws java.io.IOExceptionReturns aWriterto write into the object.- Specified by:
openWriterin interfaceTextWritable- Returns:
- the
Writer - Throws:
java.io.IOException- if the operation can't be performed
-
-