Top Constructors Methods
org.eclipse.jetty.ee10.websocket.jakarta.common.decoders

public Class InputStreamDecoder

extends Object
implements Decoder.BinaryStream<InputStream>
Class Inheritance
All Implemented Interfaces
jakarta.websocket.Decoder.BinaryStream, jakarta.websocket.Decoder
Imports
java.io.IOException, .InputStream, jakarta.websocket.DecodeException, .Decoder, .EndpointConfig

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public InputStream
decode(InputStream
the input stream carrying the bytes.
is
)

Implements jakarta.websocket.Decoder.BinaryStream.decode.

Decode the given bytes read from the input stream into an object of type T.

public void
destroy()

Overrides default jakarta.websocket.Decoder.destroy.

This method is called when the decoder is about to be removed from service in order that any resources the decoder used may be closed gracefully.

public void
init(EndpointConfig
the endpoint configuration object when being brought into service
config
)

Overrides default jakarta.websocket.Decoder.init.

This method is called with the endpoint configuration object of the endpoint this decoder is intended for when it is about to be brought into service.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

InputStreamDecoderback to summary
public InputStreamDecoder()

Method Detail

decodeback to summary
public InputStream decode(InputStream is) throws DecodeException, IOException

Implements jakarta.websocket.Decoder.BinaryStream.decode.

Doc from jakarta.websocket.Decoder.BinaryStream.decode.

Decode the given bytes read from the input stream into an object of type T.

Parameters
is:InputStream

the input stream carrying the bytes.

Returns:InputStream

the decoded object.

Annotations
@Override
Exceptions
DecodeException:
If the provided input stream cannot be decoded to type T
IOException:
If an error occurs reading the input stream
destroyback to summary
public void destroy()

Overrides default jakarta.websocket.Decoder.destroy.

Doc from jakarta.websocket.Decoder.destroy.

This method is called when the decoder is about to be removed from service in order that any resources the decoder used may be closed gracefully.

Annotations
@Override
initback to summary
public void init(EndpointConfig config)

Overrides default jakarta.websocket.Decoder.init.

Doc from jakarta.websocket.Decoder.init.

This method is called with the endpoint configuration object of the endpoint this decoder is intended for when it is about to be brought into service.

Parameters
config:EndpointConfig

the endpoint configuration object when being brought into service

Annotations
@Override