Codota Logo
ResourceResponse.flushBuffer
Code IndexAdd Codota to your IDE (free)

How to use
flushBuffer
method
in
javax.portlet.ResourceResponse

Best Java code snippets using javax.portlet.ResourceResponse.flushBuffer (Showing top 5 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
DateTime d =
  • Codota Iconnew DateTime()
  • Codota IconDateTimeFormatter formatter;String text;formatter.parseDateTime(text)
  • Codota IconObject instant;new DateTime(instant)
  • Smart code suggestions by Codota
}
origin: com.liferay.faces/liferay-faces-bridge-impl

@Override
public void flushBuffer() throws IOException {
  wrappedResourceResponse.flushBuffer();
}
origin: org.apache.portals/portlet-api_2.1.0_spec

/**
 * The default behavior of this method is to call 
 * <code>flushBuffer()</code> on the wrapped response object.
 */ 
public void flushBuffer() throws IOException {
  response.flushBuffer();
}
origin: liferay/liferay-faces

@Override
public void flushBuffer() throws IOException {
  wrappedResourceResponse.flushBuffer();
}
origin: org.zkoss.common/zweb

public void flushBuffer() throws java.io.IOException {
  _res.flushBuffer();
}
origin: stackoverflow.com

 public void descargarRecibo(ResourceRequest request,
    ResourceResponse response, PortletSession session,
    ModelMap modelMap) {
  FileInputStream fileInputStream = null;
  BufferedInputStream bufferedInputStream = null;

  String fileURL = "c:/intranetdoc/PDetalleLlamadas/file.pdf";

  try {
    fileInputStream = new java.io.FileInputStream(fileURL);
    OutputStream outputStream = response.getPortletOutputStream();
    response.setContentType("application/pdf");
    response.addProperty("Content-Disposition", "attachment; filename="
        + fileName);
    bufferedInputStream = new java.io.BufferedInputStream(
        fileInputStream);
    byte[] bytes = new byte[bufferedInputStream.available()];
    response.setContentLength(bytes.length);
    int aByte = 0;
    while ((aByte = bufferedInputStream.read()) != -1) {
      outputStream.write(aByte);
    }
    outputStream.flush();
    bufferedInputStream.close();
    response.flushBuffer();
  } catch (Exception e) {
    e.printStackTrace();
  }
}
javax.portletResourceResponseflushBuffer

Popular methods of ResourceResponse

  • setContentType
  • getPortletOutputStream
  • setProperty
  • setContentLength
    Sets the length of the content body in the response.
  • getWriter
  • setCharacterEncoding
    Sets the character encoding (MIME charset) of the response being sent to the client, for example, to
  • setLocale
    Sets the locale of the response, setting the headers (including the Content-Type's charset) as appro
  • addProperty
  • createResourceURL
  • createActionURL
  • createRenderURL
  • getCharacterEncoding
  • createRenderURL,
  • getCharacterEncoding,
  • getContentType,
  • getLocale,
  • getBufferSize,
  • getCacheControl,
  • isCommitted,
  • reset,
  • resetBuffer

Popular in Java

  • Running tasks concurrently on multiple threads
  • getSupportFragmentManager (FragmentActivity)
  • onRequestPermissionsResult (Fragment)
  • setContentView (Activity)
  • ServerSocket (java.net)
    This class represents a server-side socket that waits for incoming client connections. A ServerSocke
  • Permission (java.security)
    Abstract class for representing access to a system resource. All permissions have a name (whose inte
  • Executors (java.util.concurrent)
    Factory and utility methods for Executor, ExecutorService, ScheduledExecutorService, ThreadFactory,
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement.A servlet is a small Java program that runs within
  • Runner (org.openjdk.jmh.runner)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now