Package com.fasterxml.jackson.core.io

Examples of com.fasterxml.jackson.core.io.IOContext


     */
    @Override
    public CsvGenerator createJsonGenerator(OutputStream out) throws IOException
    {
        // false -> we won't manage the stream unless explicitly directed to
        IOContext ctxt = _createContext(out, false);
        return _createJsonGenerator(ctxt, _createWriter(out, JsonEncoding.UTF8, ctxt));
    }
View Full Code Here


    @SuppressWarnings("resource")
    @Override
    public CsvGenerator createGenerator(OutputStream out, JsonEncoding enc) throws IOException
    {
        // false -> we won't manage the stream unless explicitly directed to
        IOContext ctxt = _createContext(out, false);
        // [JACKSON-512]: allow wrapping with _outputDecorator
        if (_outputDecorator != null) {
            out = _outputDecorator.decorate(ctxt, out);
        }
        return _createGenerator(ctxt, _createWriter(out, JsonEncoding.UTF8, ctxt));
View Full Code Here

    @SuppressWarnings("resource")
    @Override
    public CsvGenerator createGenerator(Writer out) throws IOException
    {
        IOContext ctxt = _createContext(out, false);
        // [JACKSON-512]: allow wrapping with _outputDecorator
        if (_outputDecorator != null) {
            out = _outputDecorator.decorate(ctxt, out);
        }
        return _createGenerator(out, ctxt);
View Full Code Here

   
    @Override
    public AvroParser createParser(byte[] data)
        throws IOException, JsonParseException
    {
        IOContext ctxt = _createContext(data, true);
        return _createParser(data, 0, data.length, ctxt);
    }
View Full Code Here

     */
    @Override
    public AvroGenerator createGenerator(OutputStream out) throws IOException
    {
        // false -> we won't manage the stream unless explicitly directed to
        IOContext ctxt = _createContext(out, false);
        return _createGenerator(out, ctxt);
    }
View Full Code Here

    @Override
    public ToXmlGenerator createGenerator(File f, JsonEncoding enc) throws IOException
    {
        OutputStream out = new FileOutputStream(f);
        // true -> yes, we have to manage the stream since we created it
        IOContext ctxt = _createContext(out, true);
        ctxt.setEncoding(enc);
        return new ToXmlGenerator(ctxt, _generatorFeatures, _xmlGeneratorFeatures,
                _objectCodec, _createXmlWriter(out));
    }
View Full Code Here

   
    @Override
    public AvroParser createParser(byte[] data)
        throws IOException, JsonParseException
    {
        IOContext ctxt = _createContext(data, true);
        return _createParser(data, 0, data.length, ctxt);
    }
View Full Code Here

     */
    @Override
    public AvroGenerator createGenerator(OutputStream out) throws IOException
    {
        // false -> we won't manage the stream unless explicitly directed to
        IOContext ctxt = _createContext(out, false);
        return _createGenerator(out, ctxt);
    }
View Full Code Here

    @Override
    public DBObject decode(InputStream in, DBCollection collection)
            throws IOException {
        JacksonDBObject<T> decoded = new JacksonDBObject<T>();
        decoded.setObject((T) objectMapper.readValue(new DBDecoderBsonParser(
                new IOContext(new BufferRecycler(), in, false), 0, in, decoded,
                dbCollection, objectMapper), type));
        return decoded;
    }
View Full Code Here

        return new MessagePackGenerator(messagePackGeneratorFeature, _objectCodec, out);
    }

    @Override
    public JsonParser createParser(byte[] data) throws IOException, JsonParseException {
        IOContext ioContext = _createContext(data, false);
        return _createParser(data, 0, data.length, ioContext);
    }
View Full Code Here

TOP

Related Classes of com.fasterxml.jackson.core.io.IOContext

Copyright © 2018 www.massapicom. 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.