public abstract class StreamOutput extends 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() |
long |
position() |
abstract void |
reset() |
void |
seek(long position) |
boolean |
seekPositionSupported() |
StreamOutput |
setVersion(Version version) |
void |
write(byte[] b,
int off,
int len) |
void |
write(int b) |
void |
writeBoolean(boolean b)
Writes a boolean.
|
abstract void |
writeByte(byte b)
Writes a single byte.
|
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[] value) |
void |
writeFloat(float v) |
void |
writeFloatArray(float[] value) |
void |
writeGenericValue(Object value) |
void |
writeInt(int i)
Writes an int as four bytes.
|
void |
writeIntArray(int[] value) |
void |
writeLong(long i)
Writes a long as eight bytes.
|
void |
writeLongArray(long[] value) |
void |
writeMap(Map<String,Object> map) |
void |
writeOptionalBoolean(Boolean b) |
void |
writeOptionalSharedString(String str) |
void |
writeOptionalStreamable(Streamable streamable)
Serializes a potential null value.
|
void |
writeOptionalString(String str) |
void |
writeOptionalText(Text text) |
void |
writeSharedString(String str) |
void |
writeSharedText(Text text) |
void |
writeShort(short v) |
void |
writeString(String str) |
void |
writeStringArray(String[] array) |
void |
writeStringArrayNullable(String[] array)
Writes a string array, for nullable string, writes it as 0 (empty string).
|
void |
writeText(Text text) |
void |
writeTextArray(Text[] array) |
void |
writeVInt(int i)
Writes an int in a variable-length format.
|
void |
writeVLong(long i)
Writes an long in a variable-length format.
|
write
public Version getVersion()
public StreamOutput setVersion(Version version)
public boolean seekPositionSupported()
public long position() throws IOException
IOException
public void seek(long position) throws IOException
IOException
public abstract void writeByte(byte b) throws IOException
IOException
public void writeBytes(byte[] b) throws IOException
b
- the bytes to writeIOException
public void writeBytes(byte[] b, int length) throws IOException
b
- the bytes to writelength
- the number of bytes to writeIOException
public abstract void writeBytes(byte[] b, int offset, int length) throws IOException
b
- the bytes to writeoffset
- the offset in the byte arraylength
- the number of bytes to writeIOException
public void writeBytesReference(@Nullable BytesReference bytes) throws IOException
IOException
public void writeBytesRef(org.apache.lucene.util.BytesRef bytes) throws IOException
IOException
public final void writeShort(short v) throws IOException
IOException
public void writeInt(int i) throws IOException
IOException
public void writeVInt(int i) throws IOException
writeInt(int)
IOException
public void writeLong(long i) throws IOException
IOException
public void writeVLong(long i) throws IOException
IOException
public void writeOptionalString(@Nullable String str) throws IOException
IOException
public void writeOptionalSharedString(@Nullable String str) throws IOException
IOException
public void writeOptionalText(@Nullable Text text) throws IOException
IOException
public void writeText(Text text) throws IOException
IOException
public void writeTextArray(Text[] array) throws IOException
IOException
public void writeSharedText(Text text) throws IOException
IOException
public void writeString(String str) throws IOException
IOException
public void writeSharedString(String str) throws IOException
IOException
public void writeFloat(float v) throws IOException
IOException
public void writeDouble(double v) throws IOException
IOException
public void writeBoolean(boolean b) throws IOException
IOException
public void writeOptionalBoolean(@Nullable Boolean b) throws IOException
IOException
public abstract void flush() throws IOException
flush
in interface Flushable
flush
in class OutputStream
IOException
public abstract void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class OutputStream
IOException
public abstract void reset() throws IOException
IOException
public void write(int b) throws IOException
write
in class OutputStream
IOException
public void write(byte[] b, int off, int len) throws IOException
write
in class OutputStream
IOException
public void writeStringArray(String[] array) throws IOException
IOException
public void writeStringArrayNullable(@Nullable String[] array) throws IOException
IOException
public void writeMap(@Nullable Map<String,Object> map) throws IOException
IOException
public void writeGenericValue(@Nullable Object value) throws IOException
IOException
public void writeIntArray(int[] value) throws IOException
IOException
public void writeLongArray(long[] value) throws IOException
IOException
public void writeFloatArray(float[] value) throws IOException
IOException
public void writeDoubleArray(double[] value) throws IOException
IOException
public void writeOptionalStreamable(@Nullable Streamable streamable) throws IOException
IOException
Copyright © 2009–2015. All rights reserved.