Interface IDocumentContentWriter


public interface IDocumentContentWriter

Provides methods to write the content of a document.

Examples:
document.write().withContentFrom(in.file);
document.write().useEncoding("UTF-8").withContentFrom("Hello World");

API:
This is a public API.
  • Method Details

    • useEncoding

      IDocumentContentWriter useEncoding(String encoding)
      Sets the encoding that will be used by the methods withContentFrom(String) and withContentFrom(Reader) to encode the content.
      Parameters:
      encoding -
      Returns:
      document content writer
      See Also:
      API:
      This public API is available in IvyScript and Java. It has the visibility EXPERT.
    • useEncoding

      IDocumentContentWriter useEncoding(Charset encoding)
      Sets the encoding that will be used by the methods withContentFrom(String) and withContentFrom(Reader) to encode the content.
      Parameters:
      encoding -
      Returns:
      document content writer
      See Also:
      API:
      This public API is available in IvyScript and Java. It has the visibility EXPERT.
    • withContentFrom

      IDocument withContentFrom(File content)
      Writes the content of the given file to the document
      Parameters:
      content - file that contains the content that is written to the document
      Returns:
      written document
      API:
      This public API is available in IvyScript and Java. It has the visibility EXPERT.
    • withContentFrom

      IDocument withContentFrom(File content)

      Writes the content of the given file to the document

      Examples:
      document.write().withContentFrom(in.file);

      Parameters:
      content - file that contains the content that is written to the document
      Returns:
      written document
      API:
      This public API is available in IvyScript and Java. It has the visibility NOVICE.
    • withContentFrom

      IDocument withContentFrom(String content)

      Writes the content of the given string to the document

      If an encoding is set it will be used to encode the content.

      Examples:
      document.write().useEncoding("UTF-8").withContentFrom("Hello World");

      Parameters:
      content - string with the content that is written to the document
      Returns:
      written document
      See Also:
      API:
      This public API is available in IvyScript and Java. It has the visibility NOVICE.
    • withContentFrom

      IDocument withContentFrom(Reader content)

      Writes the content of the given reader to the document

      If an encoding is set it will be used to encode the content.

      Parameters:
      content - reader that delivers the content that is written to the document
      Returns:
      written document
      See Also:
      API:
      This public API is available in IvyScript and Java. It has the visibility EXPERT.
    • withContentFrom

      IDocument withContentFrom(Binary content)

      Writes the content of the given binary to the document

      Examples:
      document.write().withContentFrom(in.binary);

      Parameters:
      content - binary with the content that is written to the document
      Returns:
      written document
      API:
      This public API is available in IvyScript and Java. It has the visibility NOVICE.
    • withContentFrom

      IDocument withContentFrom(InputStream content)

      Writes the content of the input stream to the document

      Parameters:
      content - input stream that delivers the content that is written to the document
      Returns:
      written document
      API:
      This public API is available in IvyScript and Java. It has the visibility EXPERT.
    • withContentFrom

      IDocument withContentFrom(IDocument document)

      Writes the content of the given document to this document

      Parameters:
      document - document that delivers the content that is written to this document
      Returns:
      written document
      API:
      This public API is available in IvyScript and Java. It has the visibility NOVICE.