Class AbstractGeneratedTextFile
java.lang.Object
org.opendaylight.yangtools.plugin.generator.api.AbstractGeneratedFile
org.opendaylight.yangtools.plugin.generator.api.AbstractGeneratedTextFile
- All Implemented Interfaces:
Immutable
,GeneratedFile
The contents of a generated file and its
GeneratedFileLifecycle
. This class is suitable for text files,
for binary files see AbstractGeneratedFile
. Text files are encoded in StandardCharsets.UTF_8
.- Author:
- Robert Varga
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
AbstractGeneratedTextFile
(GeneratedFileLifecycle lifecycle) -
Method Summary
Modifier and TypeMethodDescriptionfinal void
writeBody
(OutputStream output) Write the body of this file into specifiedOutputStream
.protected abstract void
Write the body of this file into specifiedWriter
.Methods inherited from class org.opendaylight.yangtools.plugin.generator.api.AbstractGeneratedFile
addToStringAttributes, getLifecycle, toString
-
Constructor Details
-
AbstractGeneratedTextFile
-
-
Method Details
-
writeBody
Description copied from interface:GeneratedFile
Write the body of this file into specifiedOutputStream
.- Parameters:
output
- stream where to write the output- Throws:
IOException
- when the stream reports an IOException
-
writeBody
Write the body of this file into specifiedWriter
.- Parameters:
output
- writer where to write the output- Throws:
IOException
- when the stream reports an IOException
-