public class FileUtil extends Object
| Constructor and Description |
|---|
FileUtil() |
| Modifier and Type | Method and Description |
|---|---|
static JAXBContext |
getContext() |
static URL |
getSchemaURL() |
static Object |
read(File file)
Read one of the techno objects from a techno XML file.
|
static Object |
read(InputStream in)
Read one of the techno objects from a techno XML file inputstream.
|
static Object |
read(String file)
Read one of the techno objects from a techno XML file.
|
static Object |
read(XMLStreamReader source)
Read one of the techno objects from a techno XML reader.
|
static void |
write(Object object,
File file)
Write any of the techno objects into a file
|
static void |
write(Object object,
OutputStream out)
Write any of the techno objects into a stream
|
static void |
write(Object object,
String file)
Write any of the techno objects into a file
|
public static JAXBContext getContext() throws JAXBException
o - JAXBExceptionpublic static Object read(String file) throws XMLStreamException, FactoryConfigurationError, JAXBException, IOException
file - a techno xml fileXMLStreamExceptionFactoryConfigurationErrorJAXBExceptionIOExceptionpublic static Object read(File file) throws XMLStreamException, FactoryConfigurationError, JAXBException, IOException
file - a techno File objectXMLStreamExceptionFactoryConfigurationErrorJAXBExceptionIOExceptionpublic static Object read(InputStream in) throws XMLStreamException, FactoryConfigurationError, JAXBException
in - inputstream to a techno file contentXMLStreamExceptionFactoryConfigurationErrorJAXBExceptionpublic static Object read(XMLStreamReader source) throws JAXBException, XMLStreamException
source - an xmlstream readerJAXBExceptionXMLStreamExceptionpublic static void write(Object object, String file) throws JAXBException, IOException
object - one of the techno objectsfile - a file pathJAXBExceptionIOExceptionpublic static void write(Object object, File file) throws JAXBException, IOException
object - one of the techno objectsfile - a file to write toJAXBExceptionIOExceptionpublic static void write(Object object, OutputStream out) throws JAXBException
object - out - JAXBExceptionpublic static URL getSchemaURL()
Copyright © 2012. All Rights Reserved.