public abstract class AbstractMetainfoParser extends Object
| Modifier and Type | Field and Description |
|---|---|
protected com.google.gson.Gson |
gson |
protected com.google.gson.GsonBuilder |
gsonBuilder |
| Constructor and Description |
|---|
AbstractMetainfoParser() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract void |
composeSchema(org.apache.commons.digester.Digester digester)
Compose the schema for the metainfo
|
Metainfo |
fromJsonStream(InputStream is)
Parse metainfo from an IOStream
|
Metainfo |
fromJsonString(String json)
Convert from JSON
|
Metainfo |
fromXmlStream(InputStream metainfoStream)
Parse metainfo from an XML formatted IOStream
|
String |
toJsonString(Metainfo metaInfo)
Convert to a JSON string
|
protected final com.google.gson.GsonBuilder gsonBuilder
protected final com.google.gson.Gson gson
public String toJsonString(Metainfo metaInfo) throws IOException
IOException - Problems mapping/writing the objectpublic Metainfo fromJsonString(String json) throws IOException
json - inputIOException - IOpublic Metainfo fromJsonStream(InputStream is) throws IOException
is - IOExceptionpublic Metainfo fromXmlStream(InputStream metainfoStream) throws IOException
metainfoStream - IOExceptionprotected abstract void composeSchema(org.apache.commons.digester.Digester digester)
Digester - - The Digester object we passed in to compose the schemaIOExceptionCopyright © 2014–2015 The Apache Software Foundation. All rights reserved.