HeaderCollection

Inheritance: java.lang.Object

All Implemented Interfaces: com.aspose.ms.System.Collections.ICollection

public class HeaderCollection implements System.Collections.ICollection<String>

Defines the collection of header fields

Constructors

ConstructorDescription
HeaderCollection(HeaderCollection col)Initializes a new instance of the HeaderCollection class.
HeaderCollection()Initializes a new instance of the HeaderCollection class.

Methods

MethodDescription
add(HeaderCollection c)Adds a header to collection.
add(String item)Adds the header without value
add(String name, String value)Adds the header.
add_(String name, String value)Adds the header.
clear()Clears all headers.
contains(String item)Gets a value indicating whether the specified header is contained in the collection
copyTo(System.Array dest, int index)
copyTo(String[] array, int arrayIndex)Copies all the elements of the current collection to the specified string array starting at the specified destination index.
equals(Object arg0)
get(int index)Gets the value at the specified index.
get(String name)Gets the header value by a given header name.
getAllKeys()Gets an array of strings containing all header keys in collections
getClass()
getDecodedValue(String name)Gets the header value.
getKey(int index)Gets the key at the specified index of the collection.
getKeys()Gets a System.Collections.ObjectModel.ReadOnlyCollection{string} containing all header keys in collections
getSyncRoot()
getValues(String name)Gets the header values.
get_Item(int index)Gets a value from collection by the index.
get_Item(String name)Gets a value from collection by the name.
hasKeys()Gets a value indicating whether the collection contains keys.
hashCode()
insert(String name, String value)Inserts the header in collection.
isReadOnly()Is collection readonly
isSynchronized()
iterator()Returns an enumerator that iterates through a collection.
notify()
notifyAll()
remove(String item)Removes the header from collection by a given header name.
set(String name, String value)Sets the header.
set_Item(String name, String value)Gets a value from collection by the name.
size()Gets a count of headers
toString()
wait()
wait(long arg0)
wait(long arg0, int arg1)

HeaderCollection(HeaderCollection col)

public HeaderCollection(HeaderCollection col)

Initializes a new instance of the HeaderCollection class.

Parameters:

ParameterTypeDescription
colHeaderCollectionThe collection.

HeaderCollection()

public HeaderCollection()

Initializes a new instance of the HeaderCollection class.

add(HeaderCollection c)

public final void add(HeaderCollection c)

Adds a header to collection.

Parameters:

ParameterTypeDescription
cHeaderCollectionHeaderCollection for adding.

add(String item)

public final void add(String item)

Adds the header without value

Parameters:

ParameterTypeDescription
itemjava.lang.String

add(String name, String value)

public final void add(String name, String value)

Adds the header.

Parameters:

ParameterTypeDescription
namejava.lang.StringThe header name.
valuejava.lang.StringThe header value.

add_(String name, String value)

public void add_(String name, String value)

Adds the header.

Parameters:

ParameterTypeDescription
namejava.lang.StringThe header name.
valuejava.lang.StringThe header value.

clear()

public void clear()

Clears all headers.

contains(String item)

public final boolean contains(String item)

Gets a value indicating whether the specified header is contained in the collection

Parameters:

ParameterTypeDescription
itemjava.lang.StringA header to search

Returns: boolean - True if collection contains specified item ; otherwise, false

copyTo(System.Array dest, int index)

public void copyTo(System.Array dest, int index)

Parameters:

ParameterTypeDescription
destcom.aspose.ms.System.Array
indexint

copyTo(String[] array, int arrayIndex)

public final void copyTo(String[] array, int arrayIndex)

Copies all the elements of the current collection to the specified string array starting at the specified destination index.

Parameters:

ParameterTypeDescription
arrayjava.lang.String[]The destination of the elements copied from the current collection.
arrayIndexintAn integer that represents the index in array at which copying begins.

equals(Object arg0)

public boolean equals(Object arg0)

Parameters:

ParameterTypeDescription
arg0java.lang.Object

Returns: boolean

get(int index)

public String get(int index)

Gets the value at the specified index.

Parameters:

ParameterTypeDescription
indexintAn integer that represents the position of the element to get.

Returns: java.lang.String - The value at the specified position in current collection.

get(String name)

public final String get(String name)

Gets the header value by a given header name.

Parameters:

ParameterTypeDescription
namejava.lang.StringThe haeader name.

Returns: java.lang.String - The header value.

getAllKeys()

public String[] getAllKeys()

Gets an array of strings containing all header keys in collections

Returns: java.lang.String[]

getClass()

public final native Class<?> getClass()

Returns: java.lang.Class

getDecodedValue(String name)

public final String getDecodedValue(String name)

Gets the header value.

Parameters:

ParameterTypeDescription
namejava.lang.StringThe text header name.

Returns: java.lang.String - Decoded text value

getKey(int index)

public String getKey(int index)

Gets the key at the specified index of the collection.

Parameters:

ParameterTypeDescription
indexintThe index of the key.

Returns: java.lang.String - The key at the specified index.

getKeys()

public List<String> getKeys()

Gets a System.Collections.ObjectModel.ReadOnlyCollection{string} containing all header keys in collections

Returns: java.util.List<java.lang.String>

getSyncRoot()

public Object getSyncRoot()

Returns: java.lang.Object

getValues(String name)

public final String[] getValues(String name)

Gets the header values.

Parameters:

ParameterTypeDescription
namejava.lang.StringThe header name.

Returns: java.lang.String[] - The collection of header values.

get_Item(int index)

public final String get_Item(int index)

Gets a value from collection by the index.

Parameters:

ParameterTypeDescription
indexintThe index in collection for an item.

Returns: java.lang.String - Returns specified item

get_Item(String name)

public final String get_Item(String name)

Gets a value from collection by the name.

Parameters:

ParameterTypeDescription
namejava.lang.StringThe name (key) in collection for an item.

Returns: java.lang.String - Returns specified item

hasKeys()

public final boolean hasKeys()

Gets a value indicating whether the collection contains keys.

Returns: boolean - Returns true if collection has an items, otherwise returns false.

hashCode()

public native int hashCode()

Returns: int

insert(String name, String value)

public final void insert(String name, String value)

Inserts the header in collection. If collection contains headers with the same name this header will be inserted before other headers with the same name.

Parameters:

ParameterTypeDescription
namejava.lang.StringThe header name.
valuejava.lang.StringThe header value.

isReadOnly()

public final boolean isReadOnly()

Is collection readonly

Returns: boolean

isSynchronized()

public boolean isSynchronized()

Returns: boolean

iterator()

public final System.Collections.Generic.IGenericEnumerator<String> iterator()

Returns an enumerator that iterates through a collection.

Returns: com.aspose.ms.System.Collections.Generic.IGenericEnumerator<java.lang.String> - An System.Collections.Generic.IEnumerator{string} object that can be used to iterate through the collection.

notify()

public final native void notify()

notifyAll()

public final native void notifyAll()

remove(String item)

public final boolean remove(String item)

Removes the header from collection by a given header name.

Parameters:

ParameterTypeDescription
itemjava.lang.StringThe header name.

Returns: boolean - true if item was successfully removed from the collection.

set(String name, String value)

public final void set(String name, String value)

Sets the header.

Parameters:

ParameterTypeDescription
namejava.lang.StringThe header name.
valuejava.lang.StringThe header value.

set_Item(String name, String value)

public final void set_Item(String name, String value)

Gets a value from collection by the name.

Parameters:

ParameterTypeDescription
namejava.lang.StringThe name (key) in collection for an item.
valuejava.lang.String

size()

public int size()

Gets a count of headers

Returns: int

toString()

public String toString()

Returns: java.lang.String

wait()

public final void wait()

wait(long arg0)

public final native void wait(long arg0)

Parameters:

ParameterTypeDescription
arg0long

wait(long arg0, int arg1)

public final void wait(long arg0, int arg1)

Parameters:

ParameterTypeDescription
arg0long
arg1int