java.lang.Object
de.fraunhofer.iosb.ilt.frostserver.plugin.batchprocessing.batch.Batch<MultipartContent>
de.fraunhofer.iosb.ilt.frostserver.plugin.batchprocessing.multipart.MixedContent
All Implemented Interfaces:
Content, MultipartContent

public class MixedContent extends Batch<MultipartContent> implements MultipartContent
Parser for multipart/mixed mime type stringContent, since Tomcat only handles multipart/form-data.
Author:
scf
  • Field Details

  • Constructor Details

    • MixedContent

      public MixedContent(de.fraunhofer.iosb.ilt.frostserver.path.Version batchVersion, CoreSettings settings, boolean isChangeSet)
  • Method Details

    • parse

      public boolean parse(ServiceRequest request)
      Specified by:
      parse in class Batch<MultipartContent>
    • setBoundaryHeader

      public MixedContent setBoundaryHeader(String boundaryHeader)
    • parseLine

      public void parseLine(String line)
      Description copied from interface: MultipartContent
      Add the line to the content.
      Specified by:
      parseLine in interface MultipartContent
      Parameters:
      line - The line to add.
    • parseLineInternal

      public void parseLineInternal(String line)
    • stripLastNewline

      public void stripLastNewline()
      Description copied from interface: MultipartContent
      Informs the Content that the last newline should be removed again. The newline before a boundary is part of the boundary, not of the content.
      Specified by:
      stripLastNewline in interface MultipartContent
    • isFinished

      public MultipartContent.IsFinished isFinished()
      Description copied from interface: MultipartContent
      Gives the parse-state of the Content. This indicates if more content is expected or not.
      Specified by:
      isFinished in interface MultipartContent
      Returns:
      the parse-state of the Content.
    • getContent

      public String getContent(boolean allHeaders)
      Description copied from interface: Content
      Get the String content for response.
      Specified by:
      getContent in interface Content
      Parameters:
      allHeaders - flag indicating all headers should be included. If the content is going to be added to a HttpServletResponse, the headers need to be set separately.
      Returns:
      The content.
    • getHeaders

      public Map<String,String> getHeaders()
      Description copied from interface: Content
      Get the headers. This will include the Content-Type header.
      Specified by:
      getHeaders in interface Content
      Returns:
      the headers.