Here you can find the source of putChar(byte[] bb, char ch, int index)
public static void putChar(byte[] bb, char ch, int index)
//package com.java2s; public class Main { public static void putChar(byte[] bb, char ch, int index) { int temp = (int) ch; // byte[] b = new byte[2]; for (int i = 0; i < 2; i++) { bb[index + i] = new Integer(temp & 0xff).byteValue(); // ????????????? temp = temp >> 8; // ???????8?? }//from w w w .jav a2 s . c om } }