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
ConstructorsModifierConstructorDescriptionprotectedAbstractGeneratedTextFile(GeneratedFileLifecycle lifecycle) -
Method Summary
Modifier and TypeMethodDescriptionfinal voidwriteBody(OutputStream output) Write the body of this file into specifiedOutputStream.protected abstract voidWrite 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:GeneratedFileWrite 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
-