Class Headers

java.lang.Object
org.bouncycastle.mime.Headers
All Implemented Interfaces:
Iterable<String>, org.bouncycastle.util.Iterable<String>

public class Headers extends Object implements org.bouncycastle.util.Iterable<String>
  • Constructor Details

    • Headers

      public Headers(String contentType, String defaultContentTransferEncoding)
      Create specifying content type header value and default content transfer encoding.
      Parameters:
      contentType - The content type value
      defaultContentTransferEncoding - default content transfer encoding.
    • Headers

      public Headers(InputStream source, String defaultContentTransferEncoding) throws IOException
      Throws:
      IOException
    • Headers

      public Headers(List<String> headerLines, String defaultContentTransferEncoding)
  • Method Details

    • getContentTypeAttributes

      public Map<String,String> getContentTypeAttributes()
      Return the a Map of the ContentType attributes and their values.
      Returns:
      a Map of ContentType parameters - empty if none present.
    • isMultipart

      public boolean isMultipart()
    • getBoundary

      public String getBoundary()
    • getContentType

      public String getContentType()
    • getContentTransferEncoding

      public String getContentTransferEncoding()
    • getNames

      public Iterator<String> getNames()
    • getValues

      public String[] getValues(String header)
    • isEmpty

      public boolean isEmpty()
    • containsKey

      public boolean containsKey(String s)
    • iterator

      public Iterator<String> iterator()
      Specified by:
      iterator in interface Iterable<String>
      Specified by:
      iterator in interface org.bouncycastle.util.Iterable<String>
    • dumpHeaders

      public void dumpHeaders(OutputStream outputStream) throws IOException
      Throws:
      IOException