Package org.geoserver.config.util

Examples of org.geoserver.config.util.XStreamPersister.load()


        return result;
    }

    <T> T fromJSON(JSONObject json, Class<T> clazz) throws IOException {
        XStreamPersister xp = importer.createXStreamPersisterJSON();
        return (T) xp.load(new ByteArrayInputStream(json.toString().getBytes()), clazz);
    }

    <T> T fromJSON(Class<T> clazz) throws IOException {
        return fromJSON(json, clazz);
    }
View Full Code Here


        StreamResult result = new StreamResult(baos);
        transformer.transform(source, result);
        XStreamPersisterFactory xpf = GeoServerExtensions.bean(XStreamPersisterFactory.class);
        XStreamPersister persister = xpf.createXMLPersister();
        ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
        return persister.load(bais, DimensionInfo.class);
    }
}
View Full Code Here

                    throws IOException {
                XStreamPersister p = xpf.createXMLPersister();
                p.setCatalog( catalog );
               
                configurePersister(p,this);
                return p.load( in, clazz );
            }
        };
    }
   
    @Override
View Full Code Here

                    throws IOException {
                XStreamPersister p = xpf.createJSONPersister();
                p.setCatalog(catalog);
               
                configurePersister(p,this);
                return p.load( input, clazz );
            }
        };
    }
   
    /**
 
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.