Package io.debezium.document
Interface ArrayReader
- All Known Implementing Classes:
JacksonReader
Reads
Array
instances from a variety of input forms.- Author:
- Randall Hauch
-
Method Summary
Modifier and TypeMethodDescriptionstatic ArrayReader
Get the defaultArrayReader
instance.default Array
readArray
(byte[] rawBytes) Read an array from the supplied bytes.default Array
Read an array from the supplied file.readArray
(InputStream jsonStream) Read an array from the supplied stream.Read an array from the suppliedReader
.Read an array from the supplied JSON-formatted string.default Array
Read an array from the content at the given URL.
-
Method Details
-
defaultReader
Get the defaultArrayReader
instance.- Returns:
- the shared default reader instance; never null
-
readArray
Read an array from the supplied stream.- Parameters:
jsonStream
- the input stream to be read; may not be null- Returns:
- the array instance; never null
- Throws:
IOException
- if an array could not be read from the supplied stream
-
readArray
Read an array from the suppliedReader
.- Parameters:
jsonReader
- the reader to be read; may not be null- Returns:
- the array instance; never null
- Throws:
IOException
- if an array could not be read from the supplied reader
-
readArray
Read an array from the supplied JSON-formatted string.- Parameters:
json
- the JSON string representation to be read; may not be null- Returns:
- the array instance; never null
- Throws:
IOException
- if an array could not be read from the supplied string
-
readArray
Read an array 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 array instance; never null
- Throws:
IOException
- if an array could not be read from the supplied content
-
readArray
Read an array from the supplied file.- Parameters:
jsonFile
- the file to be read; may not be null- Returns:
- the array instance; never null
- Throws:
IOException
- if an array could not be read from the supplied file
-
readArray
Read an array from the supplied bytes.- Parameters:
rawBytes
- the UTF-8 bytes to be read; may not be null- Returns:
- the array instance; never null
- Throws:
IOException
- if an array could not be read from the supplied bytes
-