private synchronized void sendScreenSegment(int x, int y, int w, int h) {
        if(maxSend != -1) {
            if(w * h > maxSend) {
                int totalSent = 0;
                while(totalSent < h) {
                    int h1 = maxSend / w;
                    if(h1 == 0)
                        h1 = 1;
                    if(h1 > h - totalSent)
                        h1 = h - totalSent;
                    sendScreenSegment(x, y + totalSent, w, h1);
                    totalSent += h1;
                }
                return;
            }
        }
        
        stripsSent++;
        
        try {
            adjustmentArrayOutputStream.writeInt(x);
            adjustmentArrayOutputStream.writeInt(y);
            adjustmentArrayOutputStream.writeInt(w);
            adjustmentArrayOutputStream.writeInt(h);
            writeInts(pixels[newScreen], width, height, x, y, w, h);
            adjustmentArrayOutputStream.flush();
            
            if(maxScreenUpdateChunk != -1 && adjustmentArrayOutputStream.size() > maxScreenUpdateChunk) {
                endSend(RoboProtocol.SCREEN_RESPONSE_PART);
                resetSendParams();
            }
            
        } catch (Exception e) {
        }
    }