public class Encoding extends Object implements Closeable
| Constructor and Description |
|---|
Encoding(Map<Class<?>,List<InstanceHandle<? extends javax.websocket.Encoder>>> binaryEncoders,
Map<Class<?>,List<InstanceHandle<? extends javax.websocket.Decoder>>> binaryDecoders,
Map<Class<?>,List<InstanceHandle<? extends javax.websocket.Encoder>>> textEncoders,
Map<Class<?>,List<InstanceHandle<? extends javax.websocket.Decoder>>> textDecoders) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canDecodeBinary(Class<?> type) |
boolean |
canDecodeText(Class<?> type) |
boolean |
canEncodeBinary(Class<?> type) |
boolean |
canEncodeText(Class<?> type) |
void |
close() |
Object |
decodeBinary(Class<?> targetType,
byte[] bytes) |
Object |
decodeText(Class<?> targetType,
String message) |
ByteBuffer |
encodeBinary(Object o) |
String |
encodeText(Object o) |
public Encoding(Map<Class<?>,List<InstanceHandle<? extends javax.websocket.Encoder>>> binaryEncoders, Map<Class<?>,List<InstanceHandle<? extends javax.websocket.Decoder>>> binaryDecoders, Map<Class<?>,List<InstanceHandle<? extends javax.websocket.Encoder>>> textEncoders, Map<Class<?>,List<InstanceHandle<? extends javax.websocket.Decoder>>> textDecoders)
public boolean canEncodeText(Class<?> type)
public boolean canDecodeText(Class<?> type)
public boolean canEncodeBinary(Class<?> type)
public boolean canDecodeBinary(Class<?> type)
public Object decodeText(Class<?> targetType, String message) throws javax.websocket.DecodeException
javax.websocket.DecodeExceptionpublic Object decodeBinary(Class<?> targetType, byte[] bytes) throws javax.websocket.DecodeException
javax.websocket.DecodeExceptionpublic String encodeText(Object o) throws javax.websocket.EncodeException
javax.websocket.EncodeExceptionpublic ByteBuffer encodeBinary(Object o) throws javax.websocket.EncodeException
javax.websocket.EncodeExceptionpublic void close()
close in interface Closeableclose in interface AutoCloseableCopyright © 2017 JBoss by Red Hat. All rights reserved.