public JsonFactory create() { return new CBORFactory(); } }
@Override public CBORFactory copy() { _checkInvalidCopy(CBORFactory.class); // note: as with base class, must NOT copy mapper reference return new CBORFactory(this, null); }
response.getOptions().setContentFormat(APPLICATION_CBOR); CBORFactory cborF = new CBORFactory(); ByteArrayOutputStream cborO = new ByteArrayOutputStream(); CBORGenerator cborG = cborF.createGenerator(cborO, JsonEncoding.UTF8);
@Override public CBORParser createParser(byte[] data) throws IOException { return createParser(data, 0, data.length); }
@Override public XContentGenerator createGenerator(OutputStream os, Set<String> includes, Set<String> excludes) throws IOException { return new CborXContentGenerator(cborFactory.createGenerator(os, JsonEncoding.UTF8), os, includes, excludes); }
@Override public CBORFactory copy() { _checkInvalidCopy(CBORFactory.class); // note: as with base class, must NOT copy mapper reference return new CBORFactory(this, null); }
@Override public XContentParser createParser(NamedXContentRegistry xContentRegistry, BytesReference bytes) throws IOException { return createParser(xContentRegistry, bytes.streamInput()); }
@Override public XContentGenerator createGenerator(OutputStream os, Set<String> includes, Set<String> excludes) throws IOException { return new CborXContentGenerator(cborFactory.createGenerator(os, JsonEncoding.UTF8), os, includes, excludes); }
public JsonFactory create() { return new CBORFactory(); } }
@Override public CBORFactory copy() { _checkInvalidCopy(CBORFactory.class); // note: as with base class, must NOT copy mapper reference return new CBORFactory(this, null); }
public CBORParser cborCreateParser(byte[] data) throws IOException { return cborFactory.createParser(data); }
@Override public XContentGenerator createGenerator(OutputStream os, Set<String> includes, Set<String> excludes) throws IOException { return new CborXContentGenerator(cborFactory.createGenerator(os, JsonEncoding.UTF8), os, includes, excludes); }
public CborJacksonCodec() { super(new ObjectMapper(new CBORFactory())); }
@Override public XContentParser createParser(NamedXContentRegistry xContentRegistry, DeprecationHandler deprecationHandler, Reader reader) throws IOException { return new CborXContentParser(xContentRegistry, deprecationHandler, cborFactory.createParser(reader)); }
@Override public XContentGenerator createGenerator(OutputStream os, Set<String> includes, Set<String> excludes) throws IOException { return new CborXContentGenerator(cborFactory.createGenerator(os, JsonEncoding.UTF8), os, includes, excludes); }
public CborJacksonCodec() { super(new ObjectMapper(new CBORFactory())); }
@Override public XContentParser createParser(NamedXContentRegistry xContentRegistry, Reader reader) throws IOException { return new CborXContentParser(xContentRegistry, cborFactory.createParser(reader)); }
public CborJacksonCodec(ClassLoader classLoader) { super(createObjectMapper(classLoader, new ObjectMapper(new CBORFactory()))); }
@Override public XContentParser createParser(NamedXContentRegistry xContentRegistry, DeprecationHandler deprecationHandler, byte[] data, int offset, int length) throws IOException { return new CborXContentParser(xContentRegistry, deprecationHandler, cborFactory.createParser(data, offset, length)); }
public CborJacksonCodec(ClassLoader classLoader) { super(createObjectMapper(classLoader, new ObjectMapper(new CBORFactory()))); }