Top Inners Fields Constructors Methods
org.bouncycastle.mime

public Class Headers

extends Object
implements Iterable<String>
Class Inheritance
All Implemented Interfaces
org.bouncycastle.util.Iterable, java.lang.Iterable
Imports
java.io.IOException, .InputStream, .OutputStream, java.util.ArrayList, .Collections, .Iterator, .LinkedHashMap, .List, .Map, .TreeMap, org.bouncycastle.util.Iterable, .Strings

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
private String
private final String
private String
private Map<String, String>
private final Map<String, List<E>>
private final List<String>
private boolean

Constructor Summary

AccessConstructor and Description
public
Headers(String
The content type value
contentType
,
String
default content transfer encoding.
defaultContentTransferEncoding
)

Create specifying content type header value and default content transfer encoding.

public
Headers(InputStream source, String defaultContentTransferEncoding)

public
Headers(List<String> headerLines, String defaultContentTransferEncoding)

Method Summary

Modifier and TypeMethod and Description
public boolean
private Map<String, String>

Returns:

a list of ContentType parameters - empty if none present.
createContentTypeParameters
(String contentTypeParameters)

Return the a list of the ContentType parameters.

public void
dumpHeaders(OutputStream outputStream)

public String
public String
public String
public Map<String, String>

Returns:

a Map of ContentType parameters - empty if none present.
getContentTypeAttributes
()

Return the a Map of the ContentType attributes and their values.

public Iterator<String>
public String[]
getValues(String header)

public boolean
public boolean
public Iterator<String>
iterator()

Implements org.bouncycastle.util.Iterable.iterator.

Returns an iterator over a set of elements of type T.

private static List<String>
private void
put(String field, String value)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

boundaryback to summary
private String boundary
contentTransferEncodingback to summary
private final String contentTransferEncoding
contentTypeback to summary
private String contentType
contentTypeParametersback to summary
private Map<String, String> contentTypeParameters
headersback to summary
private final Map<String, List<E>> headers
headersAsPresentedback to summary
private final List<String> headersAsPresented
multipartback to summary
private boolean multipart

Constructor Detail

Headersback to summary
public Headers(String contentType, String defaultContentTransferEncoding)

Create specifying content type header value and default content transfer encoding.

Parameters
contentType:String

The content type value

defaultContentTransferEncoding:String

default content transfer encoding.

Headersback to summary
public Headers(InputStream source, String defaultContentTransferEncoding) throws IOException
Headersback to summary
public Headers(List<String> headerLines, String defaultContentTransferEncoding)

Method Detail

containsKeyback to summary
public boolean containsKey(String s)
createContentTypeParametersback to summary
private Map<String, String> createContentTypeParameters(String contentTypeParameters)

Return the a list of the ContentType parameters.

Returns:Map<String, String>

a list of ContentType parameters - empty if none present.

dumpHeadersback to summary
public void dumpHeaders(OutputStream outputStream) throws IOException
getBoundaryback to summary
public String getBoundary()
getContentTransferEncodingback to summary
public String getContentTransferEncoding()
getContentTypeback to summary
public String getContentType()
getContentTypeAttributesback to summary
public Map<String, String> getContentTypeAttributes()

Return the a Map of the ContentType attributes and their values.

Returns:Map<String, String>

a Map of ContentType parameters - empty if none present.

getNamesback to summary
public Iterator<String> getNames()
getValuesback to summary
public String[] getValues(String header)
isEmptyback to summary
public boolean isEmpty()
isMultipartback to summary
public boolean isMultipart()
iteratorback to summary
public Iterator<String> iterator()

Implements org.bouncycastle.util.Iterable.iterator.

Doc from org.bouncycastle.util.Iterable.iterator.

Returns an iterator over a set of elements of type T.

Returns:Iterator<String>

an Iterator.

parseHeadersback to summary
private static List<String> parseHeaders(InputStream src) throws IOException
putback to summary
private void put(String field, String value)
org.bouncycastle.mime back to summary

private Class Headers.KV

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
public final String
public final String

Constructor Summary

AccessConstructor and Description
public
KV(String key, String value)

public

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

keyback to summary
public final String key
valueback to summary
public final String value

Constructor Detail

KVback to summary
public KV(String key, String value)
KVback to summary
public KV(Headers.KV kv)