Interface IDocumentContentReader


public interface IDocumentContentReader

Provides methods to read the content of a document.

Example:
String content = document.read().asIvyFile().read();
String content = document.read().useEncoding("UTF-8").asString();

API:
This is a public API.
  • Method Details

    • useEncoding

      IDocumentContentReader useEncoding(String encoding)
      Sets the encoding that will be used by the methods asString() and asReader() to decode the content.
      Parameters:
      encoding -
      Returns:
      document content reader
      See Also:
      API:
      This public API is available in Java.
    • useEncoding

      IDocumentContentReader useEncoding(Charset encoding)
      Sets the encoding that will be used by the methods asString() and asReader() to decode the content.
      Parameters:
      encoding -
      Returns:
      document content reader
      API:
      This public API is available in Java.
    • asJavaFile

      File asJavaFile()
      Attention: YOU SHOULD NOT USE THIS. If you use an external document provider like S3, documents are not available on the local file system, therefore the files needs and will be automatically cached on the local system. Always prefer using the following methods in the given order: - asStream() - asReader() - asBinary() - asString()
      Returns:
      java file that holds the content of the document
      API:
      This public API is available in Java.
    • asIvyFile

      File asIvyFile()
      Attention: YOU SHOULD NOT USE THIS. If you use an external document provider like S3, documents are not available on the local file system, therefore the files needs and will be automatically cached on the local system. Always prefer using the following methods in the given order: - asStream() - asReader() - asBinary() - asString()
      Returns:
      ivy file that holds the content of the document
      API:
      This public API is available in Java.
    • asString

      String asString()
      Get a string with the content of the document. If an encoding is set it will be used to decode the content.

      Example:
      String content = document.read().asString();

      Returns:
      content as string
      See Also:
      API:
      This public API is available in Java.
    • asReader

      Reader asReader()
      Get a reader that delivers the content of the document. If an encoding is set it will be used to decode the content.
      Returns:
      reader
      See Also:
      API:
      This public API is available in Java.
    • asBinary

      Binary asBinary()

      Example:
      Binary content = document.read().asBinary();

      Returns:
      binary with the content of the document
      API:
      This public API is available in Java.
    • asStream

      InputStream asStream()
      Returns:
      input stream that delivers the content of the document
      API:
      This public API is available in Java.