Class MCRServletContentHelper

java.lang.Object
org.mycore.common.content.util.MCRServletContentHelper

public abstract class MCRServletContentHelper extends Object
Author:
Thomas Scheffler (yagee), Matthias Eichner
  • Field Details

    • DEFAULT_BUFFER_SIZE

      public static final int DEFAULT_BUFFER_SIZE
      See Also:
    • ATT_SERVE_CONTENT

      public static final String ATT_SERVE_CONTENT
  • Constructor Details

    • MCRServletContentHelper

      public MCRServletContentHelper()
  • Method Details

    • buildConfig

      public static MCRServletContentHelper.Config buildConfig(jakarta.servlet.ServletConfig servletConfig)
    • isServeContent

      public static boolean isServeContent(jakarta.servlet.http.HttpServletRequest request)
    • serveContent

      public static void serveContent(MCRContent content, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, jakarta.servlet.ServletContext context) throws IOException
      Serve the specified content, optionally including the data content. This method handles both GET and HEAD requests.
      Throws:
      IOException
    • serveContent

      public static void serveContent(MCRContent content, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, jakarta.servlet.ServletContext context, MCRServletContentHelper.Config config, boolean withContent) throws IOException
      Serve the specified content, optionally including the data content. This method handles both GET and HEAD requests.
      Throws:
      IOException
    • copyLarge

      public static long copyLarge(InputStream input, OutputStream output, long inputOffset, long length, byte[] buffer) throws IOException
      Throws:
      IOException