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 Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description IDocumentContentWriter
useEncoding(String encoding)
Sets the encoding that will be used by the methodswithContentFrom(String)
andwithContentFrom(Reader)
to encode the content.IDocumentContentWriter
useEncoding(Charset encoding)
Sets the encoding that will be used by the methodswithContentFrom(String)
andwithContentFrom(Reader)
to encode the content.IDocument
withContentFrom(Binary content)
Writes the content of the given binary to the documentIDocument
withContentFrom(File content)
Writes the content of the given file to the documentIDocument
withContentFrom(IDocument document)
Writes the content of the given document to this documentIDocument
withContentFrom(File content)
Writes the content of the given file to the documentIDocument
withContentFrom(InputStream content)
Writes the content of the input stream to the documentIDocument
withContentFrom(Reader content)
Writes the content of the given reader to the documentIDocument
withContentFrom(String content)
Writes the content of the given string to the document
-
-
-
Method Detail
-
useEncoding
IDocumentContentWriter useEncoding(String encoding)
Sets the encoding that will be used by the methodswithContentFrom(String)
andwithContentFrom(Reader)
to encode the content.- Parameters:
encoding
-- Returns:
- document content writer
- See Also:
withContentFrom(String)
,withContentFrom(Reader)
- 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 methodswithContentFrom(String)
andwithContentFrom(Reader)
to encode the content.- Parameters:
encoding
-- Returns:
- document content writer
- See Also:
withContentFrom(String)
,withContentFrom(Reader)
- 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:
useEncoding(Charset)
,useEncoding(String)
- 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:
useEncoding(Charset)
,useEncoding(String)
- 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.
-
-