Class UtfTester

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

public class UtfTester extends Object
Class for testing dom manipulation with help from SchemaHelper
Author:
ostwald

$Id $

  • Method Details

    • 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.