/** * Complete the message. * * @throws IOException */ @Override public void complete() throws IOException { if (_state == STATE_END) return; super.complete(); if (_state < STATE_FLUSHING) { _state = STATE_FLUSHING; if (_contentLength == HttpTokens.CHUNKED_CONTENT) _needEOC = true; } flushBuffer(); }
/** * Complete the message. * * @throws IOException */ @Override public void complete() throws IOException { if (_state == STATE_END) return; super.complete(); if (_state < STATE_FLUSHING) { _state = STATE_FLUSHING; if (_contentLength == HttpTokens.CHUNKED_CONTENT) _needEOC = true; } flushBuffer(); }
/** * Complete the message. * * @throws IOException */ @Override public void complete() throws IOException { if (_state == STATE_END) return; super.complete(); if (_state < STATE_FLUSHING) { _state = STATE_FLUSHING; if (_contentLength == HttpTokens.CHUNKED_CONTENT) _needEOC = true; } flushBuffer(); }
/** * Complete the message. * * @throws IOException */ @Override public void complete() throws IOException { if (_state == STATE_END) return; super.complete(); if (_state < STATE_FLUSHING) { _state = STATE_FLUSHING; if (_contentLength == HttpTokens.CHUNKED_CONTENT) _needEOC = true; } flushBuffer(); }
/** * Complete the message. * * @throws IOException */ @Override public void complete() throws IOException { if (_state == STATE_END) return; super.complete(); if (_state < STATE_FLUSHING) { _state = STATE_FLUSHING; if (_contentLength == HttpTokens.CHUNKED_CONTENT) _needEOC = true; } flushBuffer(); }
/** Prepare buffer for unchecked writes. * Prepare the generator buffer to receive unchecked writes * @return the available space in the buffer. * @throws IOException */ @Override public int prepareUncheckedAddContent() throws IOException { if (_noContent) return -1; if (_last || _state==STATE_END) return -1; // Handle any unfinished business? Buffer content = _content; if (content != null && content.length()>0 || _bufferChunked) { flushBuffer(); if (content != null && content.length()>0 || _bufferChunked) throw new IllegalStateException("FULL"); } // we better check we have a buffer if (_buffer == null) _buffer = _buffers.getBuffer(); _contentWritten-=_buffer.length(); // Handle the _content if (_head) return Integer.MAX_VALUE; return _buffer.space()-(_contentLength == HttpTokens.CHUNKED_CONTENT?CHUNK_SPACE:0); }
/** Prepare buffer for unchecked writes. * Prepare the generator buffer to receive unchecked writes * @return the available space in the buffer. * @throws IOException */ @Override public int prepareUncheckedAddContent() throws IOException { if (_noContent) return -1; if (_last || _state==STATE_END) return -1; // Handle any unfinished business? Buffer content = _content; if (content != null && content.length()>0 || _bufferChunked) { flushBuffer(); if (content != null && content.length()>0 || _bufferChunked) throw new IllegalStateException("FULL"); } // we better check we have a buffer if (_buffer == null) _buffer = _buffers.getBuffer(); _contentWritten-=_buffer.length(); // Handle the _content if (_head) return Integer.MAX_VALUE; return _buffer.space()-(_contentLength == HttpTokens.CHUNKED_CONTENT?CHUNK_SPACE:0); }
/** Prepare buffer for unchecked writes. * Prepare the generator buffer to receive unchecked writes * @return the available space in the buffer. * @throws IOException */ @Override public int prepareUncheckedAddContent() throws IOException { if (_noContent) return -1; if (_last || _state==STATE_END) return -1; // Handle any unfinished business? Buffer content = _content; if (content != null && content.length()>0 || _bufferChunked) { flushBuffer(); if (content != null && content.length()>0 || _bufferChunked) throw new IllegalStateException("FULL"); } // we better check we have a buffer if (_buffer == null) _buffer = _buffers.getBuffer(); _contentWritten-=_buffer.length(); // Handle the _content if (_head) return Integer.MAX_VALUE; return _buffer.space()-(_contentLength == HttpTokens.CHUNKED_CONTENT?CHUNK_SPACE:0); }
/** Prepare buffer for unchecked writes. * Prepare the generator buffer to receive unchecked writes * @return the available space in the buffer. * @throws IOException */ @Override public int prepareUncheckedAddContent() throws IOException { if (_noContent) return -1; if (_last || _state==STATE_END) return -1; // Handle any unfinished business? Buffer content = _content; if (content != null && content.length()>0 || _bufferChunked) { flushBuffer(); if (content != null && content.length()>0 || _bufferChunked) throw new IllegalStateException("FULL"); } // we better check we have a buffer if (_buffer == null) _buffer = _buffers.getBuffer(); _contentWritten-=_buffer.length(); // Handle the _content if (_head) return Integer.MAX_VALUE; return _buffer.space()-(_contentLength == HttpTokens.CHUNKED_CONTENT?CHUNK_SPACE:0); }
/** Prepare buffer for unchecked writes. * Prepare the generator buffer to receive unchecked writes * @return the available space in the buffer. * @throws IOException */ @Override public int prepareUncheckedAddContent() throws IOException { if (_noContent) return -1; if (_last || _state==STATE_END) return -1; // Handle any unfinished business? Buffer content = _content; if (content != null && content.length()>0 || _bufferChunked) { flushBuffer(); if (content != null && content.length()>0 || _bufferChunked) throw new IllegalStateException("FULL"); } // we better check we have a buffer if (_buffer == null) _buffer = _buffers.getBuffer(); _contentWritten-=_buffer.length(); // Handle the _content if (_head) return Integer.MAX_VALUE; return _buffer.space()-(_contentLength == HttpTokens.CHUNKED_CONTENT?CHUNK_SPACE:0); }
flushBuffer(); if (_content != null && _content.length()>0)
flushBuffer(); if (_content != null && _content.length()>0)
generator.flushBuffer(); return endp.getOutput();
flushBuffer(); if (_content != null && _content.length()>0)
flushBuffer(); if (_content != null && _content.length()>0)
flushBuffer(); if (_content != null && _content.length()>0)
generator.flushBuffer(); return endp.getOutput();
if (_generator.flushBuffer()>0)
if (_generator.flushBuffer()>0)