map.put("UTF-16 BE BOM", new byte[] { (byte) 0xFE, (byte) 0xFF, 0, 'H', 0,
'i' });
map.put("UTF-16 LE", new byte[] { 'H', 0, 'i', 0 });
map.put("UTF-16 BE", new byte[] { 0, 'H', 0, 'i' });
for (Iterator iterator = map.keySet().iterator(); iterator.hasNext();) {
String element = (String) iterator.next();
System.out.println(element + ":");
byte[] buffer = (byte[]) map.get(element);
boolean bFirst0 = buffer[0] == 0;