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.DecodeException
public Object decodeBinary(Class<?> targetType, byte[] bytes) throws javax.websocket.DecodeException
javax.websocket.DecodeException
public String encodeText(Object o) throws javax.websocket.EncodeException
javax.websocket.EncodeException
public ByteBuffer encodeBinary(Object o) throws javax.websocket.EncodeException
javax.websocket.EncodeException
public void close()
close
in interface Closeable
close
in interface AutoCloseable
Copyright © 2015 JBoss by Red Hat. All rights reserved.