public class NamedWriteableAwareStreamInput extends FilterStreamInput
StreamInput
and associates it with a NamedWriteableRegistry
delegate
Constructor and Description |
---|
NamedWriteableAwareStreamInput(StreamInput delegate,
NamedWriteableRegistry namedWriteableRegistry) |
Modifier and Type | Method and Description |
---|---|
<C extends NamedWriteable> |
readNamedWriteable(java.lang.Class<C> categoryClass)
Reads a
NamedWriteable from the current stream, by first reading its name and then looking for
the corresponding entry in the registry by name, so that the proper object can be read and returned. |
<C extends NamedWriteable> |
readNamedWriteable(java.lang.Class<C> categoryClass,
java.lang.String name)
Reads a
NamedWriteable from the current stream with the given name. |
available, close, ensureCanReadBytes, getVersion, read, readByte, readBytes, reset, setVersion
readArray, readBoolean, readByteArray, readBytesRef, readBytesRef, readBytesReference, readBytesReference, readDouble, readDoubleArray, readEnum, readException, readFloat, readFloatArray, readFully, readGenericValue, readGeoPoint, readInt, readIntArray, readList, readLong, readLongArray, readMap, readMap, readMapOfLists, readNamedWriteableList, readOptionalArray, readOptionalBoolean, readOptionalBytesReference, readOptionalDouble, readOptionalFloat, readOptionalLong, readOptionalNamedWriteable, readOptionalStreamable, readOptionalString, readOptionalStringArray, readOptionalText, readOptionalTimeZone, readOptionalVInt, readOptionalWriteable, readShort, readStreamableList, readString, readStringArray, readText, readTimeZone, readVInt, readVIntArray, readVLong, readVLongArray, readZLong, wrap, wrap
public NamedWriteableAwareStreamInput(StreamInput delegate, NamedWriteableRegistry namedWriteableRegistry)
public <C extends NamedWriteable> C readNamedWriteable(java.lang.Class<C> categoryClass) throws java.io.IOException
StreamInput
NamedWriteable
from the current stream, by first reading its name and then looking for
the corresponding entry in the registry by name, so that the proper object can be read and returned.
Default implementation throws UnsupportedOperationException
as StreamInput doesn't hold a registry.
Use FilterInputStream
instead which wraps a stream and supports a NamedWriteableRegistry
too.readNamedWriteable
in class StreamInput
java.io.IOException
public <C extends NamedWriteable> C readNamedWriteable(java.lang.Class<C> categoryClass, java.lang.String name) throws java.io.IOException
StreamInput
NamedWriteable
from the current stream with the given name. It is assumed that the caller obtained the name
from other source, so it's not read from the stream. The name is used for looking for
the corresponding entry in the registry by name, so that the proper object can be read and returned.
Default implementation throws UnsupportedOperationException
as StreamInput doesn't hold a registry.
Use FilterInputStream
instead which wraps a stream and supports a NamedWriteableRegistry
too.
Prefer StreamInput.readNamedWriteable(Class)
and StreamOutput.writeNamedWriteable(NamedWriteable)
unless you
have a compelling reason to use this method instead.readNamedWriteable
in class StreamInput
java.io.IOException