Examples of createReader()


Examples of com.fasterxml.jackson.dataformat.avro.deser.AvroReaderFactory.createReader()

    public AvroStructureReader getReader()
    {
        AvroStructureReader r = _reader.get();
        if (r == null) {
            AvroReaderFactory f = new AvroReaderFactory();
            r = f.createReader(_avroSchema);
            _reader.set(r);
        }
        return r;
    }
}
View Full Code Here

Examples of com.pogofish.jadt.source.Source.createReader()

     * Create a tokenizer that will read from the given string
     */
    private BaseJavaCCParserImplTokenManager tokenizer(String testString) {
        final Source source = new StringSource("TokenizerTest", testString);
        return new BaseJavaCCParserImplTokenManager(new JavaCharStream(
                source.createReader()));
    }

    /**
     * Comments should be invisible in the output other than separating tokens
     */
 
View Full Code Here

Examples of com.pogofish.jadt.source.StringSource.createReader()

     * @param text
     * @return
     */
    private JavaCCParserImpl parserImpl(final String text) {
        final StringSource source = new StringSource("ParserTest", text);
        return PARSER_IMPL_FACTORY.create(source.getSrcInfo(), source.createReader());
    }
 
    /**
     * Test unterminated comments
     */
 
View Full Code Here

Examples of com.thoughtworks.xstream.io.HierarchicalStreamDriver.createReader()

        if (formatExtension.equalsIgnoreCase("xml")) {
            newLayer = (WMSLayer) xs.fromXML(is);
        } else if (formatExtension.equalsIgnoreCase("json")) {
            HierarchicalStreamDriver driver = new JettisonMappedXmlDriver();
            HierarchicalStreamReader hsr = driver.createReader(is);
            // See http://jira.codehaus.org/browse/JETTISON-48
            StringWriter writer = new StringWriter();
            new HierarchicalStreamCopier().copy(
                    hsr, new PrettyPrintWriter(writer));
            writer.close();
View Full Code Here

Examples of com.thoughtworks.xstream.io.HierarchicalStreamDriver.createReader()

     * into the SeedRequest object.
     */
    private String convertJson(String entityText) throws IOException {
        HierarchicalStreamDriver driver = new JettisonMappedXmlDriver();
        StringReader reader = new StringReader(entityText);
        HierarchicalStreamReader hsr = driver.createReader(reader);
        StringWriter writer = new StringWriter();
        new HierarchicalStreamCopier().copy(hsr, new PrettyPrintWriter(
                writer));
        writer.close();
        return writer.toString();
View Full Code Here

Examples of com.thoughtworks.xstream.io.json.JettisonMappedXmlDriver.createReader()

        if (formatExtension.equalsIgnoreCase("xml")) {
            newLayer = (WMSLayer) xs.fromXML(is);
        } else if (formatExtension.equalsIgnoreCase("json")) {
            HierarchicalStreamDriver driver = new JettisonMappedXmlDriver();
            HierarchicalStreamReader hsr = driver.createReader(is);
            // See http://jira.codehaus.org/browse/JETTISON-48
            StringWriter writer = new StringWriter();
            new HierarchicalStreamCopier().copy(
                    hsr, new PrettyPrintWriter(writer));
            writer.close();
View Full Code Here

Examples of com.thoughtworks.xstream.io.json.JettisonMappedXmlDriver.createReader()

     * into the SeedRequest object.
     */
    private String convertJson(String entityText) throws IOException {
        HierarchicalStreamDriver driver = new JettisonMappedXmlDriver();
        StringReader reader = new StringReader(entityText);
        HierarchicalStreamReader hsr = driver.createReader(reader);
        StringWriter writer = new StringWriter();
        new HierarchicalStreamCopier().copy(hsr, new PrettyPrintWriter(
                writer));
        writer.close();
        return writer.toString();
View Full Code Here

Examples of com.thoughtworks.xstream.io.xml.Dom4JDriver.createReader()

        xstream.registerConverter(new ElementConverter());
        xstream.alias("person", Person.class);

        Dom4JDriver driver = new Dom4JDriver();
        Person person = (Person) xstream.unmarshal(driver.createReader(new StringReader(xml)));

        assertEquals("jason", person.firstName);
        assertEquals("van Zyl", person.lastName);
        assertNotNull(person.element);
        assertEquals("bar", person.element.element("foo").getText());
View Full Code Here

Examples of com.thoughtworks.xstream.io.xml.StaxDriver.createReader()

        }
    }

    private Object applyXStreamResponseDeserializer(String response) {
        StaxDriver driver = new StaxDriver(responseXStreamQNameMap);
        HierarchicalStreamReader responseReader = driver.createReader(new StringReader(response));

        // Move inside the soap body element...
        responseReader.moveDown();
        while(!responseReader.getNodeName().toLowerCase().endsWith("body")) {
            responseReader.moveUp();
View Full Code Here

Examples of cz.muni.fi.pa165.library.api.ReaderService.createReader()

        Form<?> form = new Form("form") {
            @Override
            protected void onSubmit() {
                ReaderService readerService = (ReaderService) ApplicationContextProvider.getApplicationContext().getBean("readerService");
                if (reader.getId() == null) {
                    readerService.createReader(reader);
                } else {
                    readerService.updateReader(reader);
                }
                setResponsePage(ShowAllReader.class);
            }
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.