byte[] outputByte = new byte[4096];
String str = new String(outputByte);
Pattern pattern = Pattern.compile("([^\u0000]*)");
Matcher matcher = pattern.matcher(str);
if(matcher.find(0)){
System.out.println(matcher.group(1).getBytes("utf-8"));
}