Class MultipartEntry

java.lang.Object
org.glassfish.grizzly.http.multipart.MultipartEntry

public class MultipartEntry extends Object
Abstraction represents single multipart entry, its functionality is pretty similar to Request. In order to read multipart entry data it's possible to use either getNIOInputStream() or getNIOReader() depends on whether we want to operate with binary or String data.
Since:
2.0.1
Author:
Alexey Stashok
  • Field Details

    • usingInputStream

      protected boolean usingInputStream
      Using stream flag.
    • usingReader

      protected boolean usingReader
      Using writer flag.
  • Method Details

    • getNIOInputStream

      public NIOInputStream getNIOInputStream()
    • getNIOReader

      public NIOReader getNIOReader()
    • getMultipartContext

      public MultipartContext getMultipartContext()
      Get multipart processing context.
      Returns:
      MultipartContext.
    • isMultipart

      public boolean isMultipart()
      Returns true if this is "multipart/*" multipart entry, or false otherwise.
      Returns:
      true if this is "multipart/*" multipart entry, or false otherwise.
    • getContentType

      public String getContentType()
      Get the multipart entry content-type.
      Returns:
      the multipart entry content-type.
    • getContentDisposition

      public ContentDisposition getContentDisposition()
      Get the multipart entry content-disposition.
      Returns:
      the multipart entry content-disposition.
    • getHeaderNames

      public Set<String> getHeaderNames()
      Get the multipart entry header names.
      Returns:
      the multipart entry header names.
    • getHeader

      public String getHeader(String name)
      Get the multipart entry header value.
      Parameters:
      name - multipart entry header name.
      Returns:
      the multipart entry header value.
    • getHeader

      public String getHeader(Header header)
      Get the multipart entry header value.
      Parameters:
      header - entry header.
      Returns:
      the multipart entry header value.
      Since:
      2.1.2
    • skip

      public void skip() throws IOException
      Skip the multipart entry processing.
      Throws:
      IOException
    • getEncoding

      protected String getEncoding()