org.neo4j.helpers
Class UTF8

java.lang.Object
  extended by org.neo4j.helpers.UTF8

public final class UTF8
extends Object

Utility class for converting strings to and from UTF-8 encoded bytes.

Author:
Tobias Ivarsson

Field Summary
static Function<byte[],String> decode
           
static Function<String,byte[]> encode
           
 
Method Summary
static int computeRequiredByteBufferSize(String text)
           
static String decode(byte[] bytes)
           
static byte[] encode(String string)
           
static String getDecodedStringFrom(ByteBuffer source)
           
static void putEncodedStringInto(String text, ByteBuffer target)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

encode

public static final Function<String,byte[]> encode

decode

public static final Function<byte[],String> decode
Method Detail

encode

public static byte[] encode(String string)

decode

public static String decode(byte[] bytes)

getDecodedStringFrom

public static String getDecodedStringFrom(ByteBuffer source)

putEncodedStringInto

public static void putEncodedStringInto(String text,
                                        ByteBuffer target)

computeRequiredByteBufferSize

public static int computeRequiredByteBufferSize(String text)


Copyright © 2002-2013 The Neo4j Graph Database Project. All Rights Reserved.