@Test public void testByteAryToAscii() { int time = 1380327876; System.out.println("time:" + new Date((long) time * 1000)); time = Integer.MAX_VALUE - time; System.out.println("inverted time:" + time); System.out.println("inverted time:" + new Date((long) time * 1000)); System.out.println("inverted time:" + ByteUtils.byteAryToAscii(ByteUtils.intToByteMSB(time))); System.out.println("max time:" + new Date((long) Integer.MAX_VALUE * 1000)); System.out.println("max time:" + ByteUtils.byteAryToAscii(ByteUtils.intToByteMSB(Integer.MAX_VALUE))); }
public static String byteAryToAscii(byte[] in) { return new String(in, DEF_CHARSET); }
ByteUtils { public static String byteAryToAscii(byte[] in) { return new String(in, DEF_CHARSET); } }
ByteUtils { public static String byteAryToAscii(byte[] in) { return new String(in, DEF_CHARSET); }  }
ByteUtils { public static String byteAryToAscii(byte[] in) { return new String(in, DEF_CHARSET); }  static byte[] md5(byte[] data); static byte[] sha1(byte[] data); static byte[] intToByteMSB(int in); static int bytesToIntMSB(byte[] bytes); static byte[] shortToByteMSB(short in); static byte[] stringToBytes(String input); static String byteAryToAscii(byte[] in); static List<String> jsonArrayToStringList(JsonArray array); }
ByteUtils { public static String byteAryToAscii(byte[] in) { return new String(in, DEF_CHARSET); }  static byte[] md5(byte[] data); static byte[] sha1(byte[] data); static byte[] intToByteMSB(int in); static int bytesToIntMSB(byte[] bytes); static byte[] shortToByteMSB(short in); static byte[] stringToBytes(String input); static String byteAryToAscii(byte[] in); static List<String> jsonArrayToStringList(JsonArray array); static final Charset DEF_CHARSET; }