Class AbstractGeneratedTextFile

java.lang.Object
org.opendaylight.yangtools.plugin.generator.api.AbstractGeneratedFile
org.opendaylight.yangtools.plugin.generator.api.AbstractGeneratedTextFile
All Implemented Interfaces:
Immutable, GeneratedFile

@NonNullByDefault public abstract class AbstractGeneratedTextFile extends AbstractGeneratedFile
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 Details

  • Method Details

    • writeBody

      public final void writeBody(OutputStream output) throws IOException
      Description copied from interface: GeneratedFile
      Write the body of this file into specified OutputStream.
      Parameters:
      output - stream where to write the output
      Throws:
      IOException - when the stream reports an IOException
    • writeBody

      protected abstract void writeBody(Writer output) throws IOException
      Write the body of this file into specified Writer.
      Parameters:
      output - writer where to write the output
      Throws:
      IOException - when the stream reports an IOException