DLESE Tools
v1.6.0

org.dlese.dpc.schemedit.test
Class UtfTester

java.lang.Object
  extended by org.dlese.dpc.schemedit.test.UtfTester

public class UtfTester
extends Object

Class for testing dom manipulation with help from SchemaHelper

Author:
ostwald

$Id $


Method Summary
static byte[] fromHexString(String s)
          Convert a hex string to a byte array.
static boolean isUtf8(char ch)
           
static boolean isUtf8(File file)
           
static boolean isUtf8(String s)
           
static void main(String[] args)
           
static String toHexString(byte[] b)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

isUtf8

public static boolean isUtf8(File file)
                      throws Exception
Throws:
Exception

isUtf8

public static boolean isUtf8(String s)

isUtf8

public static boolean isUtf8(char ch)
                      throws Exception
Throws:
Exception

main

public static void main(String[] args)
                 throws Exception
Throws:
Exception

toHexString

public static String toHexString(byte[] b)

fromHexString

public static byte[] fromHexString(String s)
Convert a hex string to a byte array. Permits upper or lower case hex.

Parameters:
s - String must have even number of characters. and be formed only of digits 0-9 A-F or a-f. No spaces, minus or plus signs.
Returns:
corresponding byte array.

DLESE Tools
v1.6.0