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

  • Finding current android device location
  • onRequestPermissionsResult (Fragment)
  • getResourceAsStream (ClassLoader)
  • getApplicationContext (Context)
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • BufferedInputStream (java.io)
    A BufferedInputStream adds functionality to another input stream-namely, the ability to buffer the i
  • URL (java.net)
    A Uniform Resource Locator that identifies the location of an Internet resource as specified by RFC
  • Comparator (java.util)
    A Comparator is used to compare two objects to determine their ordering with respect to each other.
  • Timer (java.util)
    Timers schedule one-shot or recurring TimerTask for execution. Prefer java.util.concurrent.Scheduled
  • Notification (javax.management)
  • Top 12 Jupyter Notebook extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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