Tabnine Logo
Streamable.writeTo
Code IndexAdd Tabnine to your IDE (free)

How to use
writeTo
method
in
org.elasticsearch.common.io.stream.Streamable

Best Java code snippets using org.elasticsearch.common.io.stream.Streamable.writeTo (Showing top 11 results out of 315)

origin: org.elasticsearch/elasticsearch

/**
 * Writes a list of {@link Streamable} objects
 */
public void writeStreamableList(List<? extends Streamable> list) throws IOException {
  writeVInt(list.size());
  for (Streamable obj: list) {
    obj.writeTo(this);
  }
}
origin: org.elasticsearch/elasticsearch

/**
 * Serializes a potential null value.
 */
public void writeOptionalStreamable(@Nullable Streamable streamable) throws IOException {
  if (streamable != null) {
    writeBoolean(true);
    streamable.writeTo(this);
  } else {
    writeBoolean(false);
  }
}
origin: com.strapdata.elasticsearch/elasticsearch

/**
 * Writes a list of {@link Streamable} objects
 */
public void writeStreamableList(List<? extends Streamable> list) throws IOException {
  writeVInt(list.size());
  for (Streamable obj: list) {
    obj.writeTo(this);
  }
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.elasticsearch

/**
 * Writes a list of {@link Streamable} objects
 */
public void writeStreamableList(List<? extends Streamable> list) throws IOException {
  writeVInt(list.size());
  for (Streamable obj: list) {
    obj.writeTo(this);
  }
}
origin: apache/servicemix-bundles

/**
 * Writes a list of {@link Writeable} objects
 */
public void writeList(List<? extends Writeable> list) throws IOException {
  writeVInt(list.size());
  for (Writeable obj: list) {
    obj.writeTo(this);
  }
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.elasticsearch

/**
 * Serializes a potential null value.
 */
public void writeOptionalStreamable(@Nullable Streamable streamable) throws IOException {
  if (streamable != null) {
    writeBoolean(true);
    streamable.writeTo(this);
  } else {
    writeBoolean(false);
  }
}
origin: com.strapdata.elasticsearch/elasticsearch

/**
 * Serializes a potential null value.
 */
public void writeOptionalStreamable(@Nullable Streamable streamable) throws IOException {
  if (streamable != null) {
    writeBoolean(true);
    streamable.writeTo(this);
  } else {
    writeBoolean(false);
  }
}
origin: apache/servicemix-bundles

public void writeOptionalWriteable(@Nullable Writeable writeable) throws IOException {
  if (writeable != null) {
    writeBoolean(true);
    writeable.writeTo(this);
  } else {
    writeBoolean(false);
  }
}
origin: harbby/presto-connectors

/**
 * Serializes a potential null value.
 */
public void writeOptionalStreamable(@Nullable Streamable streamable) throws IOException {
  if (streamable != null) {
    writeBoolean(true);
    streamable.writeTo(this);
  } else {
    writeBoolean(false);
  }
}
origin: com.strapdata.elasticsearch.test/framework

private static BytesReference serialize(Version version, Streamable streamable) throws IOException {
  BytesStreamOutput output = new BytesStreamOutput();
  output.setVersion(version);
  streamable.writeTo(output);
  output.flush();
  return output.bytes();
}
origin: com.strapdata.elasticsearch.test/framework

/**
 * Round trip {@code instance} through binary serialization, setting the wire compatibility version to {@code version}.
 */
private T copyInstance(T instance, Version version) throws IOException {
  try (BytesStreamOutput output = new BytesStreamOutput()) {
    output.setVersion(version);
    instance.writeTo(output);
    try (StreamInput in = new NamedWriteableAwareStreamInput(output.bytes().streamInput(),
        getNamedWriteableRegistry())) {
      in.setVersion(version);
      T newInstance = createBlankInstance();
      newInstance.readFrom(in);
      return newInstance;
    }
  }
}
org.elasticsearch.common.io.streamStreamablewriteTo

Javadoc

Write this object's fields to a StreamOutput.

Popular methods of Streamable

  • readFrom
    Set this object's fields from a StreamInput.
  • newWriteableReader

Popular in Java

  • Reactive rest calls using spring rest template
  • onCreateOptionsMenu (Activity)
  • runOnUiThread (Activity)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • InputStreamReader (java.io)
    A class for turning a byte stream into a character stream. Data read from the source input stream is
  • Thread (java.lang)
    A thread is a thread of execution in a program. The Java Virtual Machine allows an application to ha
  • ResultSet (java.sql)
    An interface for an object which represents a database table entry, returned as the result of the qu
  • Iterator (java.util)
    An iterator over a sequence of objects, such as a collection.If a collection has been changed since
  • Locale (java.util)
    Locale represents a language/country/variant combination. Locales are used to alter the presentatio
  • Top plugins for WebStorm
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