Module org.elasticsearch.server
Class VersionCheckingStreamOutput
java.lang.Object
java.io.OutputStream
org.elasticsearch.common.io.stream.StreamOutput
org.elasticsearch.common.io.stream.VersionCheckingStreamOutput
- All Implemented Interfaces:
Closeable
,Flushable
,AutoCloseable
This
StreamOutput
writes nowhere. It can be used to check if serialization would
be successful writing to a specific version.-
Field Summary
Fields inherited from class org.elasticsearch.common.io.stream.StreamOutput
GENERIC_LIST_HEADER
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Closes this stream to further operations.void
flush()
Forces any buffered output to be written.void
writeByte
(byte b) Writes a single byte.void
writeBytes
(byte[] b, int offset, int length) Writes an array of bytes.void
writeNamedWriteable
(NamedWriteable namedWriteable) Writes aNamedWriteable
to the current stream, by first writing its name and then the object itselfvoid
writeOptionalNamedWriteable
(NamedWriteable namedWriteable) Write an optionalNamedWriteable
to the stream.Methods inherited from class org.elasticsearch.common.io.stream.StreamOutput
checkWriteable, getTransportVersion, position, putVInt, setTransportVersion, write, write, writeArray, writeArray, writeBoolean, writeByteArray, writeBytes, writeBytes, writeBytesRef, writeBytesReference, writeCollection, writeCollection, writeDouble, writeDoubleArray, writeEnum, writeEnumSet, writeException, writeFloat, writeFloatArray, writeGenericList, writeGenericMap, writeGenericNull, writeGenericString, writeGenericValue, writeGeoPoint, writeInstant, writeInt, writeIntArray, writeLong, writeLongArray, writeMap, writeMap, writeMap, writeMapValues, writeMapValues, writeMapWithConsistentOrder, writeMissingString, writeMissingWriteable, writeNamedWriteableCollection, writeOptionalArray, writeOptionalArray, writeOptionalBoolean, writeOptionalByteArray, writeOptionalBytesReference, writeOptionalCollection, writeOptionalCollection, writeOptionalDouble, writeOptionalEnum, writeOptionalFloat, writeOptionalFloatArray, writeOptionalInstant, writeOptionalInt, writeOptionalLong, writeOptionalSecureString, writeOptionalString, writeOptionalStringArray, writeOptionalStringCollection, writeOptionalText, writeOptionalTimeValue, writeOptionalVInt, writeOptionalVLong, writeOptionalWriteable, writeOptionalZoneId, writeSecureString, writeShort, writeString, writeStringArray, writeStringArrayNullable, writeStringCollection, writeText, writeTimeValue, writeVInt, writeVIntArray, writeVLong, writeVLongArray, writeWithSizePrefix, writeWriteable, writeZLong, writeZoneId
Methods inherited from class java.io.OutputStream
nullOutputStream, write
-
Constructor Details
-
VersionCheckingStreamOutput
-
-
Method Details
-
writeByte
Description copied from class:StreamOutput
Writes a single byte.- Specified by:
writeByte
in classStreamOutput
- Throws:
IOException
-
writeBytes
Description copied from class:StreamOutput
Writes an array of bytes.- Specified by:
writeBytes
in classStreamOutput
- Parameters:
b
- the bytes to writeoffset
- the offset in the byte arraylength
- the number of bytes to write- Throws:
IOException
-
flush
Description copied from class:StreamOutput
Forces any buffered output to be written.- Specified by:
flush
in interfaceFlushable
- Specified by:
flush
in classStreamOutput
- Throws:
IOException
-
close
Description copied from class:StreamOutput
Closes this stream to further operations.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in classStreamOutput
- Throws:
IOException
-
writeNamedWriteable
Description copied from class:StreamOutput
Writes aNamedWriteable
to the current stream, by first writing its name and then the object itself- Overrides:
writeNamedWriteable
in classStreamOutput
- Throws:
IOException
-
writeOptionalNamedWriteable
Description copied from class:StreamOutput
Write an optionalNamedWriteable
to the stream.- Overrides:
writeOptionalNamedWriteable
in classStreamOutput
- Throws:
IOException
-