Package io.debezium.document
Interface ArrayReader
-
- All Known Implementing Classes:
JacksonReader
@ThreadSafe public interface ArrayReader
ReadsArrayinstances 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 ArrayReaderdefaultReader()Get the defaultArrayReaderinstance.default ArrayreadArray(byte[] rawBytes)Read an array from the supplied bytes.default ArrayreadArray(File jsonFile)Read an array from the supplied file.ArrayreadArray(InputStream jsonStream)Read an array from the supplied stream.ArrayreadArray(Reader jsonReader)Read an array from the suppliedReader.ArrayreadArray(String json)Read an array from the supplied JSON-formatted string.default ArrayreadArray(URL jsonUrl)Read an array from the content at the given URL.
-
-
-
Method Detail
-
defaultReader
static ArrayReader defaultReader()
Get the defaultArrayReaderinstance.- 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
-
-