Here you can find the source of reverseWordLatin(byte[] b)
public static void reverseWordLatin(byte[] b)
//package com.java2s; public class Main { public static void reverseWordLatin(byte[] b) { int len = 0; int size = b.length; for (int i = size - 1; i >= 0; i--) { if ((b[i] & 0xff) != '\0') { len = i + 1;/*www .j ava 2 s . c o m*/ break; } } for (int i = 0; i < len / 2; i++) { byte tmp = b[i]; b[i] = b[size - 1 - i]; b[size - 1 - i] = tmp; } } }