javax.websocket.Decoder, javax.websocket.Decoder.Text<java.lang.Boolean>public class BooleanDecoder extends AbstractDecoder implements javax.websocket.Decoder.Text<java.lang.Boolean>
Decoder.Text Message to Boolean decoder.
Note: delegates to Boolean.parseBoolean(String) and will only support "true" and "false" as boolean values.
javax.websocket.Decoder.Binary<T extends java.lang.Object>, javax.websocket.Decoder.BinaryStream<T extends java.lang.Object>, javax.websocket.Decoder.Text<T extends java.lang.Object>, javax.websocket.Decoder.TextStream<T extends java.lang.Object>| Modifier and Type | Field | Description |
|---|---|---|
static BooleanDecoder |
INSTANCE |
| Constructor | Description |
|---|---|
BooleanDecoder() |
| Modifier and Type | Method | Description |
|---|---|---|
java.lang.Boolean |
decode(java.lang.String s) |
|
boolean |
willDecode(java.lang.String s) |
destroy, initpublic static final BooleanDecoder INSTANCE
public java.lang.Boolean decode(java.lang.String s)
throws javax.websocket.DecodeException
decode in interface javax.websocket.Decoder.Text<java.lang.Boolean>javax.websocket.DecodeExceptionpublic boolean willDecode(java.lang.String s)
willDecode in interface javax.websocket.Decoder.Text<java.lang.Boolean>Copyright © 1995–2018 Webtide. All rights reserved.