Package io.debezium.document
Interface DocumentReader
- All Known Implementing Classes:
JacksonReader
Reads
Document
instances from a variety of input forms.- Author:
- Randall Hauch
-
Method Summary
Modifier and TypeMethodDescriptionstatic DocumentReader
Get the defaultDocumentReader
instance.static DocumentReader
GetDocumentReader
instance that returns fp numbers as text.default Document
read
(byte[] rawBytes) Read a document from the supplied bytes.default Document
Read a document from the supplied file.read
(InputStream jsonStream) Read a document from the supplied stream.Read a document from the suppliedReader
.Read a document from the supplied JSON-formatted string.default Document
Read a document from the content at the given URL.
-
Method Details
-
defaultReader
Get the defaultDocumentReader
instance.- Returns:
- the shared default reader instance; never null
-
floatNumbersAsTextReader
GetDocumentReader
instance that returns fp numbers as text.- Returns:
- the shared default reader instance; never null
-
read
Read a document from the supplied stream.- Parameters:
jsonStream
- the input stream to be read; may not be null- Returns:
- the document instance; never null
- Throws:
IOException
- if a document could not be read from the supplied stream
-
read
Read a document from the suppliedReader
.- Parameters:
jsonReader
- the reader to be read; may not be null- Returns:
- the document instance; never null
- Throws:
IOException
- if a document could not be read from the supplied reader
-
read
Read a document from the supplied JSON-formatted string.- Parameters:
json
- the JSON string representation to be read; may not be null- Returns:
- the document instance; never null
- Throws:
IOException
- if a document could not be read from the supplied string
-
read
Read a document from the content at the given URL.- Parameters:
jsonUrl
- the URL to the content that is to be read; may not be null- Returns:
- the document instance; never null
- Throws:
IOException
- if a document could not be read from the supplied content
-
read
Read a document from the supplied file.- Parameters:
jsonFile
- the file to be read; may not be null- Returns:
- the document instance; never null
- Throws:
IOException
- if a document could not be read from the supplied file
-
read
Read a document from the supplied bytes.- Parameters:
rawBytes
- the UTF-8 bytes to be read; may not be null- Returns:
- the document instance; never null
- Throws:
IOException
- if a document could not be read from the supplied bytes
-