Tabnine Logo
JsonEncoder.configure
Code IndexAdd Tabnine to your IDE (free)

How to use
configure
method
in
org.apache.avro.io.JsonEncoder

Best Java code snippets using org.apache.avro.io.JsonEncoder.configure (Showing top 11 results out of 315)

origin: apache/avro

/**
 * Reconfigures this JsonEncoder to use the output stream provided.
 * <p/>
 * If the OutputStream provided is null, a NullPointerException is thrown.
 * <p/>
 * Otherwise, this JsonEncoder will flush its current output and then
 * reconfigure its output to use a default UTF8 JsonGenerator that writes
 * to the provided OutputStream.
 *
 * @param out
 *          The OutputStream to direct output to. Cannot be null.
 * @throws IOException
 * @return this JsonEncoder
 */
public JsonEncoder configure(OutputStream out) throws IOException {
 this.configure(getJsonGenerator(out, false));
 return this;
}
origin: org.apache.avro/avro

/**
 * Reconfigures this JsonEncoder to use the output stream provided.
 * <p/>
 * If the OutputStream provided is null, a NullPointerException is thrown.
 * <p/>
 * Otherwise, this JsonEncoder will flush its current output and then
 * reconfigure its output to use a default UTF8 JsonGenerator that writes
 * to the provided OutputStream.
 *
 * @param out
 *          The OutputStream to direct output to. Cannot be null.
 * @throws IOException
 * @return this JsonEncoder
 */
public JsonEncoder configure(OutputStream out) throws IOException {
 this.configure(getJsonGenerator(out, false));
 return this;
}
origin: apache/avro

JsonEncoder(Schema sc, JsonGenerator out) throws IOException {
 configure(out);
 this.parser =
  new Parser(new JsonGrammarGenerator().generate(sc), this);
}
origin: org.apache.avro/avro

JsonEncoder(Schema sc, JsonGenerator out) throws IOException {
 configure(out);
 this.parser =
  new Parser(new JsonGrammarGenerator().generate(sc), this);
}
origin: apache/avro

@Test
public void testJsonEncoderInit() throws IOException {
 Schema s = Schema.parse("\"int\"");
 OutputStream out = new ByteArrayOutputStream();
 factory.jsonEncoder(s, out);
 JsonEncoder enc = factory.jsonEncoder(s,
   new JsonFactory().createJsonGenerator(out, JsonEncoding.UTF8));
 enc.configure(out);
}
origin: com.facebook.presto.hive/hive-apache

/**
 * Reconfigures this JsonEncoder to use the output stream provided.
 * <p/>
 * If the OutputStream provided is null, a NullPointerException is thrown.
 * <p/>
 * Otherwise, this JsonEncoder will flush its current output and then
 * reconfigure its output to use a default UTF8 JsonGenerator that writes
 * to the provided OutputStream.
 * 
 * @param out
 *          The OutputStream to direct output to. Cannot be null.
 * @throws IOException
 * @return this JsonEncoder
 */
public JsonEncoder configure(OutputStream out) throws IOException {
 this.configure(getJsonGenerator(out));
 return this;
}

origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.avro

/**
 * Reconfigures this JsonEncoder to use the output stream provided.
 * <p/>
 * If the OutputStream provided is null, a NullPointerException is thrown.
 * <p/>
 * Otherwise, this JsonEncoder will flush its current output and then
 * reconfigure its output to use a default UTF8 JsonGenerator that writes
 * to the provided OutputStream.
 *
 * @param out
 *          The OutputStream to direct output to. Cannot be null.
 * @throws IOException
 * @return this JsonEncoder
 */
public JsonEncoder configure(OutputStream out) throws IOException {
 this.configure(getJsonGenerator(out, false));
 return this;
}
origin: unchartedsoftware/aperture-tiles

JsonEncoder encoder = EncoderFactory.get().jsonEncoder(schema, output);
for (Object datum: fileReader) {
  encoder.configure(output);
  writer.write(datum, encoder);
  encoder.flush();
origin: com.facebook.presto.hive/hive-apache

JsonEncoder(Schema sc, JsonGenerator out) throws IOException {
 configure(out);
 this.parser =
  new Parser(new JsonGrammarGenerator().generate(sc), this);
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.avro

JsonEncoder(Schema sc, JsonGenerator out) throws IOException {
 configure(out);
 this.parser =
  new Parser(new JsonGrammarGenerator().generate(sc), this);
}
origin: usc-isi-i2/Web-Karma

JsonEncoder encoder = EncoderFactory.get().jsonEncoder(reader.getSchema(), new JsonFactory().createJsonGenerator(baos)).configure(baos);
writer.write(record, encoder);
encoder.flush();
org.apache.avro.ioJsonEncoderconfigure

Javadoc

Reconfigures this JsonEncoder to output to the JsonGenerator provided.

If the JsonGenerator provided is null, a NullPointerException is thrown.

Otherwise, this JsonEncoder will flush its current output and then reconfigure its output to use the provided JsonGenerator.

Popular methods of JsonEncoder

  • flush
  • <init>
  • depth
  • getJsonGenerator
  • pop
  • push
  • writeByteArray
  • writeBytes
  • writeString

Popular in Java

  • Creating JSON documents from java classes using gson
  • getSharedPreferences (Context)
  • requestLocationUpdates (LocationManager)
  • putExtra (Intent)
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • Calendar (java.util)
    Calendar is an abstract base class for converting between a Date object and a set of integer fields
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
  • Table (org.hibernate.mapping)
    A relational table
  • Top 17 Plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now