@Override public boolean isCommitted() { return ((MimeResponse)response).isCommitted(); }
public static void write(MimeResponse mimeResponse, byte[][] bytesArray) throws IOException { // LEP-3122 if (mimeResponse.isCommitted()) { return; } // LEP-536 long contentLength = 0; for (byte[] bytes : bytesArray) { contentLength += bytes.length; } if (mimeResponse instanceof ResourceResponse) { ResourceResponse resourceResponse = (ResourceResponse)mimeResponse; setContentLength(resourceResponse, contentLength); } OutputStream outputStream = mimeResponse.getPortletOutputStream(); for (byte[] bytes : bytesArray) { outputStream.write(bytes); } }
public static void write( MimeResponse mimeResponse, byte[] bytes, int offset, int contentLength) throws IOException { // LEP-3122 if (!mimeResponse.isCommitted()) { // LEP-536 if (contentLength == 0) { contentLength = bytes.length; } if (mimeResponse instanceof ResourceResponse) { ResourceResponse resourceResponse = (ResourceResponse)mimeResponse; resourceResponse.setContentLength(contentLength); } OutputStream outputStream = mimeResponse.getPortletOutputStream(); outputStream.write(bytes, offset, contentLength); } }
public static void write( MimeResponse mimeResponse, InputStream inputStream, int contentLength) throws IOException { if (mimeResponse.isCommitted()) { if (inputStream != null) { try { inputStream.close(); } catch (IOException ioe) { if (_log.isWarnEnabled()) { _log.warn(ioe, ioe); } } } return; } if (contentLength > 0) { if (mimeResponse instanceof ResourceResponse) { ResourceResponse resourceResponse = (ResourceResponse)mimeResponse; resourceResponse.setContentLength(contentLength); } } StreamUtil.transfer(inputStream, mimeResponse.getPortletOutputStream()); }
public boolean isCommitted() { return mresp.isCommitted(); }
@Override public boolean isCommitted() { if (portletResponse instanceof MimeResponse) { return ((MimeResponse) portletResponse).isCommitted(); } return included; }
/** {@inheritDoc} */ public boolean isResponseCommitted() { return response.isCommitted(); }
@Override public boolean isCommitted() { return mimeResponse.isCommitted(); }
public boolean isCommitted() { PortletResponse portletResponse = getWrapped(); if (portletResponse instanceof MimeResponse) { MimeResponse mimeResponse = (MimeResponse) portletResponse; return mimeResponse.isCommitted(); } else { return true; } }
public boolean isCommitted() { PortletResponse portletResponse = getWrapped(); if (portletResponse instanceof MimeResponse) { MimeResponse mimeResponse = (MimeResponse) portletResponse; return mimeResponse.isCommitted(); } else { return true; } }
public boolean isCommitted() { return getResponse().isCommitted(); }
public boolean isCommitted() { return getResponse().isCommitted(); }
/** * @see {@link ExternalContext#isResponseCommitted()} * @since JSF 2.0 */ @Override public boolean isResponseCommitted() { if (portletResponse instanceof MimeResponse) { MimeResponse mimeResponse = (MimeResponse) portletResponse; boolean responseCommitted = mimeResponse.isCommitted(); if (manageIncongruities) { incongruityContext.setResponseCommitted(responseCommitted); } return responseCommitted; } else { if (manageIncongruities) { return incongruityContext.isResponseCommitted(); } else { throw new IllegalStateException(); } } }
/** * @see {@link ExternalContext#isResponseCommitted()} * @since JSF 2.0 */ @Override public boolean isResponseCommitted() { if (portletResponse instanceof MimeResponse) { MimeResponse mimeResponse = (MimeResponse) portletResponse; boolean responseCommitted = mimeResponse.isCommitted(); if (manageIncongruities) { incongruityContext.setResponseCommitted(responseCommitted); } return responseCommitted; } else { if (manageIncongruities) { return incongruityContext.isResponseCommitted(); } else { throw new IllegalStateException(); } } }
if (((MimeResponse)resp).isCommitted())