throw new PPTException("Cannot transmit response to designated stream.", e);
throw new PPTException("Cannot read response to designated stream.", e);
    public void getResponse(OutputStream strm) throws PPTException {        try {            if (strm == null)                throw new PPTException("Cannot write response to \"null\" OutputStream.");            int bytesRead, markBufBytes, i;            MarkFinder mfinder = new MarkFinder(PPTSessionProtocol.PPT_COMPLETE_DATA_TRANSMITION.getBytes());            byte[] markBuffer = new byte[PPTSessionProtocol.PPT_COMPLETE_DATA_TRANSMITION.length()];            markBufBytes = 0; // zero byte count in the mark buffer            BufferedOutputStream bstrm = new BufferedOutputStream(strm);            byte[] inBuff = new byte[4096];            boolean done = false;            while (!done) {                bytesRead = this.readBuffer(inBuff);                          // Read the response.                if (bytesRead != 0) {                                         // Got something?                    for (i = 0; i < bytesRead && !done; i++) {                // look at what we got...                        done = mfinder.markCheck(inBuff[i]);                  // check for the mark                        if (!done) {                                          // didn't find the mark?                            if (mfinder.getMarkIndex() > 0) {                 // did ya find part of it?                                markBuffer[markBufBytes++] = inBuff[i];       // cache it in case this fragment                                                                              // isn't part of the whole mark.                            } else {                                if (markBufBytes > 0) {                       // if we found part of the mark                                                                              // (but got fooled) then                                    bstrm.write(markBuffer, 0, markBufBytes); // send the fragment.                                    markBufBytes = 0;                                }                                bstrm.write(inBuff[i]);                       // send this byte that's not part                                                                              // of a mark.                            }                        }                    }                } else {                    done = true;                }            }            bstrm.flush();        }        catch (IOException e) {            closeConnection();            throw new PPTException("Cannot transmit response to designated stream.", e);        }    }