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, writeByteArray, writeBytesRef, writeDoubleArray, writeFloatArray, writeGenericValue, writeIntArray, writeLongArray, writeMap, writeOptionalBoolean, writeOptionalSharedString, writeOptionalStreamable, writeOptionalString, writeOptionalText, writeShort, writeStringArray, writeStringArrayNullable, writeTextArrayprotected StreamOutput out
public AdapterStreamOutput(StreamOutput out)
public StreamOutput setVersion(Version version)
setVersion in class StreamOutputpublic void setOut(StreamOutput out)
public StreamOutput wrappedOut()
public boolean seekPositionSupported()
seekPositionSupported in class StreamOutputpublic long position()
throws IOException
position in class StreamOutputIOExceptionpublic void seek(long position)
throws IOException
seek in class StreamOutputIOExceptionpublic void writeByte(byte b)
throws IOException
StreamOutputwriteByte in class StreamOutputIOExceptionpublic void writeBytes(byte[] b,
int offset,
int length)
throws IOException
StreamOutputwriteBytes in class StreamOutputb - the bytes to writeoffset - the offset in the byte arraylength - the number of bytes to writeIOExceptionpublic void flush()
throws IOException
StreamOutputflush in interface Flushableflush in class StreamOutputIOExceptionpublic void close()
throws IOException
StreamOutputclose in interface Closeableclose in interface AutoCloseableclose in class StreamOutputIOExceptionpublic void reset()
throws IOException
reset in class StreamOutputIOExceptionpublic void writeBytes(byte[] b)
throws IOException
StreamOutputwriteBytes in class StreamOutputb - the bytes to writeIOExceptionpublic void writeBytes(byte[] b,
int length)
throws IOException
StreamOutputwriteBytes in class StreamOutputb - the bytes to writelength - the number of bytes to writeIOExceptionpublic void writeBytesReference(@Nullable BytesReference bytes) throws IOException
StreamOutputwriteBytesReference in class StreamOutputIOExceptionpublic void writeInt(int i)
throws IOException
StreamOutputwriteInt in class StreamOutputIOExceptionpublic void writeVInt(int i)
throws IOException
StreamOutputStreamOutput.writeInt(int)writeVInt in class StreamOutputIOExceptionpublic void writeLong(long i)
throws IOException
StreamOutputwriteLong in class StreamOutputIOExceptionpublic void writeVLong(long i)
throws IOException
StreamOutputwriteVLong in class StreamOutputIOExceptionpublic void writeString(String str) throws IOException
writeString in class StreamOutputIOExceptionpublic void writeSharedString(String str) throws IOException
writeSharedString in class StreamOutputIOExceptionpublic void writeText(Text text) throws IOException
writeText in class StreamOutputIOExceptionpublic void writeSharedText(Text text) throws IOException
writeSharedText in class StreamOutputIOExceptionpublic void writeFloat(float v)
throws IOException
writeFloat in class StreamOutputIOExceptionpublic void writeDouble(double v)
throws IOException
writeDouble in class StreamOutputIOExceptionpublic void writeBoolean(boolean b)
throws IOException
StreamOutputwriteBoolean in class StreamOutputIOExceptionpublic void write(int b)
throws IOException
write in class StreamOutputIOExceptionpublic void write(byte[] b,
int off,
int len)
throws IOException
write in class StreamOutputIOExceptionpublic void write(byte[] b)
throws IOException
write in class OutputStreamIOExceptionCopyright © 2009–2016. All rights reserved.