Package com.landawn.abacus.parser
Interface Parser<SC extends SerializationConfig<?>,DC extends DeserializationConfig<?>>
- Type Parameters:
SC
-DC
-
- All Known Subinterfaces:
JSONParser
,XMLParser
- All Known Implementing Classes:
AvroParser
,KryoParser
public interface Parser<SC extends SerializationConfig<?>,DC extends DeserializationConfig<?>>
Design principles: 1, Simple (is beautiful) 2, Fast (is powerful) 3, Concepts (must be integral
and consistent)
These principles can't be broken by any change or reason. And basically programmable is > configurable. There is no extra support by configuration file or annotation. All the implementation should be multi-thread safety.
These principles can't be broken by any change or reason. And basically programmable is > configurable. There is no extra support by configuration file or annotation. All the implementation should be multi-thread safety.
- Since:
- 0.8
- Author:
- Haiyang Li
- See Also:
-
Method Summary
Modifier and TypeMethodDescription<T> T
deserialize
(Class<T> targetClass, File source) <T> T
deserialize
(Class<T> targetClass, File source, DC config) <T> T
deserialize
(Class<T> targetClass, InputStream source) <T> T
deserialize
(Class<T> targetClass, InputStream source, DC config) <T> T
deserialize
(Class<T> targetClass, Reader source) <T> T
deserialize
(Class<T> targetClass, Reader source, DC config) <T> T
deserialize
(Class<T> targetClass, String source) <T> T
deserialize
(Class<T> targetClass, String source, DC config) void
void
void
serialize
(OutputStream output, Object obj) void
serialize
(OutputStream output, Object obj, SC config) void
void
-
Method Details
-
serialize
- Parameters:
obj
-- Returns:
-
serialize
- Parameters:
obj
-config
-- Returns:
-
serialize
- Parameters:
output
-obj
-- Throws:
UncheckedIOException
- the unchecked IO exception
-
serialize
- Parameters:
output
-obj
-config
-- Throws:
UncheckedIOException
- the unchecked IO exception
-
serialize
- Parameters:
output
-obj
-- Throws:
UncheckedIOException
- the unchecked IO exception
-
serialize
- Parameters:
output
-obj
-config
-- Throws:
UncheckedIOException
- the unchecked IO exception
-
serialize
- Parameters:
output
-obj
-- Throws:
UncheckedIOException
- the unchecked IO exception
-
serialize
- Parameters:
output
-obj
-config
-- Throws:
UncheckedIOException
- the unchecked IO exception
-
deserialize
- Type Parameters:
T
-- Parameters:
targetClass
-source
-- Returns:
-
deserialize
- Type Parameters:
T
-- Parameters:
targetClass
-source
-config
-- Returns:
-
deserialize
- Type Parameters:
T
-- Parameters:
targetClass
-source
-- Returns:
- Throws:
UncheckedIOException
- the unchecked IO exception
-
deserialize
- Type Parameters:
T
-- Parameters:
targetClass
-source
-config
-- Returns:
- Throws:
UncheckedIOException
- the unchecked IO exception
-
deserialize
- Type Parameters:
T
-- Parameters:
targetClass
-source
-- Returns:
- Throws:
UncheckedIOException
- the unchecked IO exception
-
deserialize
- Type Parameters:
T
-- Parameters:
targetClass
-source
-config
-- Returns:
- Throws:
UncheckedIOException
- the unchecked IO exception
-
deserialize
- Type Parameters:
T
-- Parameters:
targetClass
-source
-- Returns:
- Throws:
UncheckedIOException
- the unchecked IO exception
-
deserialize
- Type Parameters:
T
-- Parameters:
targetClass
-source
-config
-- Returns:
- Throws:
UncheckedIOException
- the unchecked IO exception
-