Package ca.phon.xml
Interface XMLSerializer
public interface XMLSerializer
XML Serializer.
-
Method Summary
Modifier and TypeMethodDescriptionClass<?>
The type handled by this serializer.<T> T
read
(Class<T> type, InputStream input) Read an object of typedeclaredType()
from the givenInputStream
.<T> void
write
(Class<T> type, T obj, OutputStream output) Write an object of typedeclaredType()
to the givenOutputStream
as xml data.
-
Method Details
-
read
Read an object of typedeclaredType()
from the givenInputStream
.- Parameters:
input
-- Returns:
- the read object
- Throws:
IOException
- if an error occurs during read
-
write
Write an object of typedeclaredType()
to the givenOutputStream
as xml data.- Parameters:
output
-- Throws:
IOException
- if an error occurs during write
-
declaredType
Class<?> declaredType()The type handled by this serializer.- Returns:
-