public class AdapterStreamOutput extends StreamOutput
Modifier and Type | Field and Description |
---|---|
protected StreamOutput |
out |
Constructor and Description |
---|
AdapterStreamOutput(StreamOutput out) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes this stream to further operations.
|
void |
flush()
Forces any buffered output to be written.
|
long |
position() |
void |
reset() |
void |
seek(long position) |
boolean |
seekPositionSupported() |
void |
setOut(StreamOutput out) |
StreamOutput |
setVersion(Version version) |
String |
toString() |
StreamOutput |
wrappedOut() |
void |
write(byte[] b) |
void |
write(byte[] b,
int off,
int len) |
void |
write(int b) |
void |
writeBoolean(boolean b)
Writes a boolean.
|
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.
|
void |
writeBytes(byte[] b,
int offset,
int length)
Writes an array of bytes.
|
void |
writeBytesReference(BytesReference bytes)
Writes the bytes reference, including a length header.
|
void |
writeDouble(double v) |
void |
writeFloat(float v) |
void |
writeInt(int i)
Writes an int as four bytes.
|
void |
writeLong(long i)
Writes a long as eight bytes.
|
void |
writeSharedString(String str) |
void |
writeSharedText(Text text) |
void |
writeString(String str) |
void |
writeText(Text text) |
void |
writeVInt(int i)
Writes an int in a variable-length format.
|
void |
writeVLong(long i)
Writes an long in a variable-length format.
|
getVersion, writeBytesRef, writeDoubleArray, writeFloatArray, writeGenericValue, writeIntArray, writeLongArray, writeMap, writeOptionalBoolean, writeOptionalSharedString, writeOptionalStreamable, writeOptionalString, writeOptionalText, writeShort, writeStringArray, writeStringArrayNullable, writeTextArray
protected StreamOutput out
public AdapterStreamOutput(StreamOutput out)
public StreamOutput setVersion(Version version)
setVersion
in class StreamOutput
public void setOut(StreamOutput out)
public StreamOutput wrappedOut()
public boolean seekPositionSupported()
seekPositionSupported
in class StreamOutput
public long position() throws IOException
position
in class StreamOutput
IOException
public void seek(long position) throws IOException
seek
in class StreamOutput
IOException
public void writeByte(byte b) throws IOException
StreamOutput
writeByte
in class StreamOutput
IOException
public void writeBytes(byte[] b, int offset, int length) throws IOException
StreamOutput
writeBytes
in class StreamOutput
b
- the bytes to writeoffset
- the offset in the byte arraylength
- the number of bytes to writeIOException
public void flush() throws IOException
StreamOutput
flush
in interface Flushable
flush
in class StreamOutput
IOException
public void close() throws IOException
StreamOutput
close
in interface Closeable
close
in interface AutoCloseable
close
in class StreamOutput
IOException
public void reset() throws IOException
reset
in class StreamOutput
IOException
public void writeBytes(byte[] b) throws IOException
StreamOutput
writeBytes
in class StreamOutput
b
- the bytes to writeIOException
public void writeBytes(byte[] b, int length) throws IOException
StreamOutput
writeBytes
in class StreamOutput
b
- the bytes to writelength
- the number of bytes to writeIOException
public void writeBytesReference(@Nullable BytesReference bytes) throws IOException
StreamOutput
writeBytesReference
in class StreamOutput
IOException
public void writeInt(int i) throws IOException
StreamOutput
writeInt
in class StreamOutput
IOException
public void writeVInt(int i) throws IOException
StreamOutput
StreamOutput.writeInt(int)
writeVInt
in class StreamOutput
IOException
public void writeLong(long i) throws IOException
StreamOutput
writeLong
in class StreamOutput
IOException
public void writeVLong(long i) throws IOException
StreamOutput
writeVLong
in class StreamOutput
IOException
public void writeString(String str) throws IOException
writeString
in class StreamOutput
IOException
public void writeSharedString(String str) throws IOException
writeSharedString
in class StreamOutput
IOException
public void writeText(Text text) throws IOException
writeText
in class StreamOutput
IOException
public void writeSharedText(Text text) throws IOException
writeSharedText
in class StreamOutput
IOException
public void writeFloat(float v) throws IOException
writeFloat
in class StreamOutput
IOException
public void writeDouble(double v) throws IOException
writeDouble
in class StreamOutput
IOException
public void writeBoolean(boolean b) throws IOException
StreamOutput
writeBoolean
in class StreamOutput
IOException
public void write(int b) throws IOException
write
in class StreamOutput
IOException
public void write(byte[] b, int off, int len) throws IOException
write
in class StreamOutput
IOException
public void write(byte[] b) throws IOException
write
in class OutputStream
IOException
Copyright © 2009–2015. All rights reserved.