Package org.eclipse.sisu.mojos
Class CachingWriter
- java.lang.Object
-
- java.io.Writer
-
- java.io.StringWriter
-
- org.eclipse.sisu.mojos.CachingWriter
-
- All Implemented Interfaces:
java.io.Closeable
,java.io.Flushable
,java.lang.Appendable
,java.lang.AutoCloseable
public class CachingWriter extends java.io.StringWriter
-
-
Constructor Summary
Constructors Constructor Description CachingWriter(java.nio.file.Path path, java.nio.charset.Charset charset)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
private static java.lang.String
readString(java.nio.file.Path path, java.nio.charset.Charset charset)
private static void
writeString(java.nio.file.Path path, java.lang.String str, java.nio.charset.Charset charset)
-
-
-
Method Detail
-
close
public void close() throws java.io.IOException
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Overrides:
close
in classjava.io.StringWriter
- Throws:
java.io.IOException
-
readString
private static java.lang.String readString(java.nio.file.Path path, java.nio.charset.Charset charset) throws java.io.IOException
- Throws:
java.io.IOException
-
writeString
private static void writeString(java.nio.file.Path path, java.lang.String str, java.nio.charset.Charset charset) throws java.io.IOException
- Throws:
java.io.IOException
-
-