Package io.debezium.document
Interface ArrayReader
-
- All Known Implementing Classes:
JacksonReader
@ThreadSafe public interface ArrayReader
ReadsArray
instances from a variety of input forms.- Author:
- Randall Hauch
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description static ArrayReader
defaultReader()
Get the defaultArrayReader
instance.default Array
readArray(byte[] rawBytes)
Read an array from the supplied bytes.default Array
readArray(File jsonFile)
Read an array from the supplied file.Array
readArray(InputStream jsonStream)
Read an array from the supplied stream.Array
readArray(Reader jsonReader)
Read an array from the suppliedReader
.Array
readArray(String json)
Read an array from the supplied JSON-formatted string.default Array
readArray(URL jsonUrl)
Read an array from the content at the given URL.
-
-
-
Method Detail
-
defaultReader
static ArrayReader defaultReader()
Get the defaultArrayReader
instance.- Returns:
- the shared default reader instance; never null
-
readArray
Array readArray(InputStream jsonStream) throws IOException
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
Array readArray(Reader jsonReader) throws IOException
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
Array readArray(String json) throws IOException
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
default Array readArray(URL jsonUrl) throws IOException
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
default Array readArray(File jsonFile) throws IOException
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
default Array readArray(byte[] rawBytes) throws IOException
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
-
-