public abstract class StreamOutput
extends java.io.OutputStream
Constructor and Description |
---|
StreamOutput() |
Modifier and Type | Method and Description |
---|---|
abstract void |
close()
Closes this stream to further operations.
|
abstract void |
flush()
Forces any buffered output to be written.
|
Version |
getVersion()
The version of the node on the other side of this stream.
|
long |
position() |
abstract void |
reset() |
void |
seek(long position) |
void |
setVersion(Version version)
Set the version of the node on the other side of this stream.
|
void |
write(byte[] b,
int off,
int len) |
void |
write(int b) |
void |
writeAggregatorBuilder(AggregatorBuilder<?> builder)
Writes a
AggregatorBuilder to the current stream |
void |
writeBoolean(boolean b)
Writes a boolean.
|
abstract void |
writeByte(byte b)
Writes a single byte.
|
void |
writeByteArray(byte[] b)
Writes an array of bytes.
|
void |
writeBytes(byte[] b)
Writes an array of bytes.
|
void |
writeBytes(byte[] b,
int length)
Writes an array of bytes.
|
abstract void |
writeBytes(byte[] b,
int offset,
int length)
Writes an array of bytes.
|
void |
writeBytesRef(org.apache.lucene.util.BytesRef bytes) |
void |
writeBytesReference(BytesReference bytes)
Writes the bytes reference, including a length header.
|
void |
writeDouble(double v) |
void |
writeDoubleArray(double[] values) |
void |
writeFloat(float v) |
void |
writeFloatArray(float[] values) |
void |
writeGenericValue(java.lang.Object value) |
void |
writeGeoPoint(GeoPoint geoPoint)
Writes the given
GeoPoint to the stream |
void |
writeInt(int i)
Writes an int as four bytes.
|
void |
writeIntArray(int[] values) |
<T extends Writeable<T>> |
writeList(java.util.List<T> list)
Writes a list of
Writeable objects |
void |
writeLong(long i)
Writes a long as eight bytes.
|
void |
writeLongArray(long[] values) |
void |
writeMap(java.util.Map<java.lang.String,java.lang.Object> map) |
void |
writeOptionalBoolean(java.lang.Boolean b) |
void |
writeOptionalBytesReference(BytesReference bytes)
Writes an optional bytes reference including a length header.
|
void |
writeOptionalFloat(java.lang.Float floatValue) |
void |
writeOptionalQuery(QueryBuilder<?> queryBuilder)
Write an optional
QueryBuilder to the stream. |
void |
writeOptionalStreamable(Streamable streamable)
Serializes a potential null value.
|
void |
writeOptionalString(java.lang.String str) |
void |
writeOptionalStringArray(java.lang.String[] array)
Writes a string array, for nullable string, writes false.
|
void |
writeOptionalText(Text text) |
void |
writeOptionalVInt(java.lang.Integer integer) |
void |
writeOptionalWriteable(Writeable<?> writeable) |
void |
writePhraseSuggestionSmoothingModel(SmoothingModel smoothinModel)
Writes the given
SmoothingModel to the stream |
void |
writePipelineAggregatorBuilder(PipelineAggregatorBuilder<?> builder)
Writes a
PipelineAggregatorBuilder to the current stream |
void |
writeQuery(QueryBuilder<?> queryBuilder)
Writes a
QueryBuilder to the current stream |
void |
writeRescorer(RescoreBuilder<?> rescorer)
Writes a
RescoreBuilder to the current stream |
void |
writeScoreFunction(ScoreFunctionBuilder<?> scoreFunctionBuilder)
Writes a
ScoreFunctionBuilder to the current stream |
void |
writeShape(ShapeBuilder shapeBuilder)
Writes a
ShapeBuilder to the current stream |
void |
writeShort(short v) |
void |
writeSortBuilder(SortBuilder<?> sort)
Writes a
SortBuilder to the current stream |
void |
writeString(java.lang.String str) |
void |
writeStringArray(java.lang.String[] array) |
void |
writeStringArrayNullable(java.lang.String[] array)
Writes a string array, for nullable string, writes it as 0 (empty string).
|
void |
writeSuggestion(SuggestionBuilder<?> suggestion)
Writes a
SuggestionBuilder to the current stream |
void |
writeTaskStatus(Task.Status status)
Writes a
Task.Status to the current stream. |
void |
writeText(Text text) |
void |
writeThrowable(java.lang.Throwable throwable) |
void |
writeVInt(int i)
Writes an int in a variable-length format.
|
void |
writeVIntArray(int[] values) |
void |
writeVLong(long i)
Writes a non-negative long in a variable-length format.
|
void |
writeVLongArray(long[] values) |
void |
writeZLong(long i)
Writes a long in a variable-length format.
|
public Version getVersion()
public void setVersion(Version version)
public long position() throws java.io.IOException
java.io.IOException
public void seek(long position) throws java.io.IOException
java.io.IOException
public abstract void writeByte(byte b) throws java.io.IOException
java.io.IOException
public void writeBytes(byte[] b) throws java.io.IOException
b
- the bytes to writejava.io.IOException
public void writeBytes(byte[] b, int length) throws java.io.IOException
b
- the bytes to writelength
- the number of bytes to writejava.io.IOException
public abstract void writeBytes(byte[] b, int offset, int length) throws java.io.IOException
b
- the bytes to writeoffset
- the offset in the byte arraylength
- the number of bytes to writejava.io.IOException
public void writeByteArray(byte[] b) throws java.io.IOException
b
- the bytes to writejava.io.IOException
public void writeBytesReference(@Nullable BytesReference bytes) throws java.io.IOException
java.io.IOException
public void writeOptionalBytesReference(@Nullable BytesReference bytes) throws java.io.IOException
writeBytesReference(BytesReference)
and StreamInput.readBytesReference()
if you do not.java.io.IOException
public void writeBytesRef(org.apache.lucene.util.BytesRef bytes) throws java.io.IOException
java.io.IOException
public final void writeShort(short v) throws java.io.IOException
java.io.IOException
public void writeInt(int i) throws java.io.IOException
java.io.IOException
public void writeVInt(int i) throws java.io.IOException
writeInt(int)
java.io.IOException
public void writeLong(long i) throws java.io.IOException
java.io.IOException
public void writeVLong(long i) throws java.io.IOException
java.io.IOException
public void writeZLong(long i) throws java.io.IOException
writeVLong(long)
java.io.IOException
public void writeOptionalString(@Nullable java.lang.String str) throws java.io.IOException
java.io.IOException
public void writeOptionalVInt(@Nullable java.lang.Integer integer) throws java.io.IOException
java.io.IOException
public void writeOptionalFloat(@Nullable java.lang.Float floatValue) throws java.io.IOException
java.io.IOException
public void writeOptionalText(@Nullable Text text) throws java.io.IOException
java.io.IOException
public void writeText(Text text) throws java.io.IOException
java.io.IOException
public void writeString(java.lang.String str) throws java.io.IOException
java.io.IOException
public void writeFloat(float v) throws java.io.IOException
java.io.IOException
public void writeDouble(double v) throws java.io.IOException
java.io.IOException
public void writeBoolean(boolean b) throws java.io.IOException
java.io.IOException
public void writeOptionalBoolean(@Nullable java.lang.Boolean b) throws java.io.IOException
java.io.IOException
public abstract void flush() throws java.io.IOException
flush
in interface java.io.Flushable
flush
in class java.io.OutputStream
java.io.IOException
public abstract void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class java.io.OutputStream
java.io.IOException
public abstract void reset() throws java.io.IOException
java.io.IOException
public void write(int b) throws java.io.IOException
write
in class java.io.OutputStream
java.io.IOException
public void write(byte[] b, int off, int len) throws java.io.IOException
write
in class java.io.OutputStream
java.io.IOException
public void writeStringArray(java.lang.String[] array) throws java.io.IOException
java.io.IOException
public void writeStringArrayNullable(@Nullable java.lang.String[] array) throws java.io.IOException
java.io.IOException
public void writeOptionalStringArray(@Nullable java.lang.String[] array) throws java.io.IOException
java.io.IOException
public void writeMap(@Nullable java.util.Map<java.lang.String,java.lang.Object> map) throws java.io.IOException
java.io.IOException
public void writeGenericValue(@Nullable java.lang.Object value) throws java.io.IOException
java.io.IOException
public void writeIntArray(int[] values) throws java.io.IOException
java.io.IOException
public void writeVIntArray(int[] values) throws java.io.IOException
java.io.IOException
public void writeLongArray(long[] values) throws java.io.IOException
java.io.IOException
public void writeVLongArray(long[] values) throws java.io.IOException
java.io.IOException
public void writeFloatArray(float[] values) throws java.io.IOException
java.io.IOException
public void writeDoubleArray(double[] values) throws java.io.IOException
java.io.IOException
public void writeOptionalStreamable(@Nullable Streamable streamable) throws java.io.IOException
java.io.IOException
public void writeOptionalWriteable(@Nullable Writeable<?> writeable) throws java.io.IOException
java.io.IOException
public void writeThrowable(java.lang.Throwable throwable) throws java.io.IOException
java.io.IOException
public void writeAggregatorBuilder(AggregatorBuilder<?> builder) throws java.io.IOException
AggregatorBuilder
to the current streamjava.io.IOException
public void writePipelineAggregatorBuilder(PipelineAggregatorBuilder<?> builder) throws java.io.IOException
PipelineAggregatorBuilder
to the current streamjava.io.IOException
public void writeQuery(QueryBuilder<?> queryBuilder) throws java.io.IOException
QueryBuilder
to the current streamjava.io.IOException
public void writeOptionalQuery(@Nullable QueryBuilder<?> queryBuilder) throws java.io.IOException
QueryBuilder
to the stream.java.io.IOException
public void writeShape(ShapeBuilder shapeBuilder) throws java.io.IOException
ShapeBuilder
to the current streamjava.io.IOException
public void writeScoreFunction(ScoreFunctionBuilder<?> scoreFunctionBuilder) throws java.io.IOException
ScoreFunctionBuilder
to the current streamjava.io.IOException
public void writePhraseSuggestionSmoothingModel(SmoothingModel smoothinModel) throws java.io.IOException
SmoothingModel
to the streamjava.io.IOException
public void writeTaskStatus(Task.Status status) throws java.io.IOException
Task.Status
to the current stream.java.io.IOException
public void writeGeoPoint(GeoPoint geoPoint) throws java.io.IOException
GeoPoint
to the streamjava.io.IOException
public <T extends Writeable<T>> void writeList(java.util.List<T> list) throws java.io.IOException
Writeable
objectsjava.io.IOException
public void writeRescorer(RescoreBuilder<?> rescorer) throws java.io.IOException
RescoreBuilder
to the current streamjava.io.IOException
public void writeSuggestion(SuggestionBuilder<?> suggestion) throws java.io.IOException
SuggestionBuilder
to the current streamjava.io.IOException
public void writeSortBuilder(SortBuilder<?> sort) throws java.io.IOException
SortBuilder
to the current streamjava.io.IOException