Modifier and Type | Class and Description |
---|---|
static class |
HeaderCollection.KeysCollection
Represents keys collection.
|
Constructor and Description |
---|
HeaderCollection()
Initializes a new instance of the
HeaderCollection class. |
HeaderCollection(HeaderCollection col)
Initializes a new instance of the
HeaderCollection class. |
Modifier and Type | Method and Description |
---|---|
void |
add_(String name,
String value)
Adds the header.
|
void |
add(HeaderCollection c)
Adds a header to collection.
|
void |
add(MimeHeader header)
Deprecated.
|
void |
add(String name,
String value)
Adds the header.
|
void |
clear()
Clears all headers.
|
void |
copyTo(com.aspose.ms.System.Array dest,
int index)
Copies all the elements of the current collection
to the specified Array starting at the specified destination index.
|
void |
copyTo(Object[] dest,
int index) |
String |
get_Item(int index)
Gets a value from collection by the index.
|
String |
get_Item(String name)
Gets a value from collection by the name.
|
String |
get(int index)
Gets the value at the specified index.
|
String |
get(String name)
Gets the header value by a given header name.
|
String[] |
getAllKeys()
Gets an array of strings containing all header keys in collections
|
int |
getCount()
Gets a count of headers
|
String |
getDecodedValue(String name)
Gets the header value.
|
String |
getKey(int index)
Gets the key at the specified index of the collection.
|
HeaderCollection.KeysCollection |
getKeys()
Gets a
KeysCollection containing all header keys in collections |
Object |
getSyncRoot()
Gets an object that can be used to synchronize access to the System.Collections.ICollection.
|
String[] |
getValues(String name)
Gets the header values.
|
boolean |
hasKeys()
Gets a value indicating whether the collection contains keys.
|
boolean |
isSynchronized()
Gets a value indicating whether access to the System.Collections.ICollection is synchronized (thread safe).
|
com.aspose.ms.System.Collections.IEnumerator |
iterator()
Returns an enumerator that iterates through a collection.
|
void |
remove(String name)
Removes the header from collection by a given header name.
|
void |
set_Item(String name,
String value)
Gets a value from collection by the name.
|
void |
set(String name,
String value)
Sets the header.
|
int |
size()
Gets a count of headers
|
public HeaderCollection(HeaderCollection col)
Initializes a new instance of the HeaderCollection
class.
col
- The collection.public HeaderCollection()
Initializes a new instance of the HeaderCollection
class.
public String[] getAllKeys()
Gets an array of strings containing all header keys in collections
String
objects.public HeaderCollection.KeysCollection getKeys()
Gets a KeysCollection
containing all header keys in collections
HeaderCollection.KeysCollection
object.public int size()
Gets a count of headers
size
in interface com.aspose.ms.System.Collections.ICollection
public int getCount()
Gets a count of headers
public Object getSyncRoot()
Gets an object that can be used to synchronize access to the System.Collections.ICollection.
getSyncRoot
in interface com.aspose.ms.System.Collections.ICollection
Object
object.public boolean isSynchronized()
Gets a value indicating whether access to the System.Collections.ICollection is synchronized (thread safe).
isSynchronized
in interface com.aspose.ms.System.Collections.ICollection
public String get_Item(String name)
Gets a value from collection by the name.
name
- The name (key) in collection for an item.public void set_Item(String name, String value)
Gets a value from collection by the name.
name
- The name (key) in collection for an item.value
- a String
object.public String get_Item(int index)
Gets a value from collection by the index.
index
- The index in collection for an item.public void clear()
Clears all headers.
public String getKey(int index)
Gets the key at the specified index of the collection.
index
- The index of the key.public String get(int index)
Gets the value at the specified index.
index
- An integer that represents the position of the element to get.public String get(String name)
Gets the header value by a given header name.
name
- The haeader name.public String getDecodedValue(String name)
Gets the header value.
name
- The text header name.public String[] getValues(String name)
Gets the header values.
name
- The header name.public void add_(String name, String value)
Adds the header.
name
- The header name.value
- The header value.public void add(HeaderCollection c)
Adds a header to collection.
c
- HeaderCollection for adding.public void add(String name, String value)
Adds the header.
name
- The header name.value
- The header value.@Deprecated public void add(MimeHeader header)
Adds the header.
header
- The MimeHeader
.public void set(String name, String value)
Sets the header.
name
- The header name.value
- The header value.public void copyTo(com.aspose.ms.System.Array dest, int index)
Copies all the elements of the current collection to the specified Array starting at the specified destination index.
copyTo
in interface com.aspose.ms.System.Collections.ICollection
dest
- The destination of the elements copied from the current collection.index
- An integer that represents the index in array at which copying begins.public void copyTo(Object[] dest, int index)
public boolean hasKeys()
Gets a value indicating whether the collection contains keys.
public void remove(String name)
Removes the header from collection by a given header name.
name
- The header name.public com.aspose.ms.System.Collections.IEnumerator iterator()
Returns an enumerator that iterates through a collection.
Copyright (c) 2008-2015 Aspose Pty Ltd. All Rights Reserved.