while (!done && pstrm!=null) {
while (!done) {
    public void getResponse(OutputStream strm) throws PPTException {        PrintStream pstrm = null;        if (strm != null) {            pstrm = new PrintStream(strm, true);        }        boolean done = false;        while (!done && pstrm!=null) {            byte[] inBuff = new byte[4096];            int bytesRead = this.readBuffer(inBuff);            if (bytesRead != 0) {                int termlen = PPTSessionProtocol.PPT_COMPLETE_DATA_TRANSMITION.length();                int writeBytes = bytesRead;                if (bytesRead >= termlen) {                    String inEnd = "";                    for (int j = 0; j < termlen; j++)                        inEnd += inBuff[(bytesRead - termlen) + j];                    System.out.println("inEnd:        "+inEnd+" (length: "+inEnd.length()+")");                    System.out.println("search value: "+PPTSessionProtocol.PPT_COMPLETE_DATA_TRANSMITION + " (length: "+PPTSessionProtocol.PPT_COMPLETE_DATA_TRANSMITION.length()+") ");                    if (inEnd.equals(PPTSessionProtocol.PPT_COMPLETE_DATA_TRANSMITION)) {                        done = true;                        writeBytes = bytesRead - termlen;                    }                }                for (int j = 0; j < writeBytes; j++)                    pstrm.write(inBuff[j]);            } else {                done = true;            }        }    }