Package org.codehaus.modello.plugin
Class CachingWriter
- java.lang.Object
-
- java.io.Writer
-
- java.io.StringWriter
-
- org.codehaus.modello.plugin.CachingWriter
-
- All Implemented Interfaces:
java.io.Closeable
,java.io.Flushable
,java.lang.Appendable
,java.lang.AutoCloseable
public class CachingWriter extends java.io.StringWriter
-
-
Field Summary
Fields Modifier and Type Field Description private org.sonatype.plexus.build.incremental.BuildContext
buildContext
private java.nio.charset.Charset
charset
private java.nio.file.Path
path
-
Constructor Summary
Constructors Constructor Description CachingWriter(org.sonatype.plexus.build.incremental.BuildContext buildContext, 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
-
-