org.alfresco.zookeeper
Class ZkStringSerializer
java.lang.Object
org.alfresco.zookeeper.ZkStringSerializer
- All Implemented Interfaces:
- org.I0Itec.zkclient.serialize.ZkSerializer
public class ZkStringSerializer
- extends Object
- implements org.I0Itec.zkclient.serialize.ZkSerializer
A serializer that is compatible with the
ZooKeeper command line client (ZkCli).
TODO: Handle different encodings because the ZkCli does not!
- Since:
- 1.0
- Author:
- Derek Hulley
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ZkStringSerializer
public ZkStringSerializer()
serialize
public byte[] serialize(Object data)
throws org.I0Itec.zkclient.exception.ZkMarshallingError
- Specified by:
serialize in interface org.I0Itec.zkclient.serialize.ZkSerializer
- Parameters:
data - String data
- Returns:
- the UTF-8 byte representation of the data
- Throws:
org.I0Itec.zkclient.exception.ZkMarshallingError
deserialize
public Object deserialize(byte[] bytes)
throws org.I0Itec.zkclient.exception.ZkMarshallingError
- TODO: Cater for mixed charsets inboud
- Specified by:
deserialize in interface org.I0Itec.zkclient.serialize.ZkSerializer
- Parameters:
bytes - the UTF-8 byte representation of a String.
- Throws:
org.I0Itec.zkclient.exception.ZkMarshallingError
Copyright © 2012. All Rights Reserved.