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 |
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[] 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.
|
writepublic Version getVersion()
public StreamOutput setVersion(Version version)
public boolean seekPositionSupported()
public long position()
throws IOException
IOExceptionpublic void seek(long position)
throws IOException
IOExceptionpublic abstract void writeByte(byte b)
throws IOException
IOExceptionpublic void writeBytes(byte[] b)
throws IOException
b - the bytes to writeIOExceptionpublic void writeBytes(byte[] b,
int length)
throws IOException
b - the bytes to writelength - the number of bytes to writeIOExceptionpublic 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 writeIOExceptionpublic void writeByteArray(byte[] b)
throws IOException
b - the bytes to writeIOExceptionpublic void writeBytesReference(@Nullable BytesReference bytes) throws IOException
IOExceptionpublic void writeBytesRef(org.apache.lucene.util.BytesRef bytes)
throws IOException
IOExceptionpublic final void writeShort(short v)
throws IOException
IOExceptionpublic void writeInt(int i)
throws IOException
IOExceptionpublic void writeVInt(int i)
throws IOException
writeInt(int)IOExceptionpublic void writeLong(long i)
throws IOException
IOExceptionpublic void writeVLong(long i)
throws IOException
IOExceptionpublic void writeOptionalString(@Nullable String str) throws IOException
IOExceptionpublic void writeOptionalSharedString(@Nullable String str) throws IOException
IOExceptionpublic void writeOptionalText(@Nullable Text text) throws IOException
IOExceptionpublic void writeText(Text text) throws IOException
IOExceptionpublic void writeTextArray(Text[] array) throws IOException
IOExceptionpublic void writeSharedText(Text text) throws IOException
IOExceptionpublic void writeString(String str) throws IOException
IOExceptionpublic void writeSharedString(String str) throws IOException
IOExceptionpublic void writeFloat(float v)
throws IOException
IOExceptionpublic void writeDouble(double v)
throws IOException
IOExceptionpublic void writeBoolean(boolean b)
throws IOException
IOExceptionpublic void writeOptionalBoolean(@Nullable Boolean b) throws IOException
IOExceptionpublic abstract void flush()
throws IOException
flush in interface Flushableflush in class OutputStreamIOExceptionpublic abstract void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class OutputStreamIOExceptionpublic abstract void reset()
throws IOException
IOExceptionpublic void write(int b)
throws IOException
write in class OutputStreamIOExceptionpublic void write(byte[] b,
int off,
int len)
throws IOException
write in class OutputStreamIOExceptionpublic void writeStringArray(String[] array) throws IOException
IOExceptionpublic void writeStringArrayNullable(@Nullable String[] array) throws IOException
IOExceptionpublic void writeMap(@Nullable Map<String,Object> map) throws IOException
IOExceptionpublic void writeGenericValue(@Nullable Object value) throws IOException
IOExceptionpublic void writeIntArray(int[] value)
throws IOException
IOExceptionpublic void writeLongArray(long[] value)
throws IOException
IOExceptionpublic void writeFloatArray(float[] value)
throws IOException
IOExceptionpublic void writeDoubleArray(double[] value)
throws IOException
IOExceptionpublic void writeOptionalStreamable(@Nullable Streamable streamable) throws IOException
IOExceptionCopyright © 2009–2016. All rights reserved.