byte buf[] = { (byte) b }; write(buf, 0, 1);
if (channel == null) throw new SocketException("not connected"); while (true) { try { channel.getVMChannel().write(b); return; } catch (InterruptedIOException iioe) {  } }
    public void write(int b) throws IOException    {      byte buf[] = { (byte) b };      write(buf, 0, 1);    }