com.croftsoft.core.beans
Class XmlBeanCoder
java.lang.Object
com.croftsoft.core.beans.XmlBeanCoder
- All Implemented Interfaces:
- Encoder, Parser
public final class XmlBeanCoder
- extends Object
- implements Encoder, Parser
Encodes and decodes objects using XMLEncoder and XMLDecoder.
- Since:
- 2003-04-07
- Version:
- $Id: XmlBeanCoder.java,v 1.2 2006/01/24 22:20:29 croft Exp $
- See Also:
XMLEncoder
,
XMLDecoder
- Author:
- David Wallace Croft
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
INSTANCE
public static final XmlBeanCoder INSTANCE
decodeFromXml
public static Object decodeFromXml(byte[] bytes)
decodeFromXml
public static Object decodeFromXml(InputStream inputStream)
encodeAsXml
public static void encodeAsXml(Object o,
OutputStream outputStream)
encodeAsXml
public static byte[] encodeAsXml(Object o)
loadFromXmlFile
public static Object loadFromXmlFile(File file)
throws IOException
- Throws:
IOException
loadFromXmlFile
public static Object loadFromXmlFile(String filename)
throws IOException
- Throws:
IOException
saveToXmlFile
public static void saveToXmlFile(Object object,
File file)
throws IOException
- Throws:
IOException
saveToXmlFile
public static void saveToXmlFile(Object object,
String filename)
throws IOException
- Throws:
IOException
encode
public byte[] encode(Object object)
throws IOException
- Specified by:
encode
in interface Encoder
- Throws:
IOException
parse
public Object parse(InputStream inputStream,
int contentLength)
throws IOException
- Specified by:
parse
in interface Parser
contentLength
- -1 if unknown.
- Throws:
IOException
CroftSoft Core Javadoc (2008-09-28 20:58:02)