YoutrackUnmarshaller.java
626 Bytes
package pl.itcrowd.youtrack.api;
import pl.itcrowd.youtrack.api.rest.ObjectFactory;
import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBException;
import java.io.Reader;
import java.io.StringReader;
public final class YoutrackUnmarshaller {
public static Object unmarshall(String string) throws JAXBException
{
return unmarshall(new StringReader(string));
}
public static Object unmarshall(Reader reader) throws JAXBException
{
return JAXBContext.newInstance(ObjectFactory.class).createUnmarshaller().unmarshal(reader);
}
private YoutrackUnmarshaller()
{
}
}