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
Constructor | Description |
---|---|
HeaderCollection(HeaderCollection col) | Initializes a new instance of the HeaderCollection class. |
HeaderCollection() | Initializes a new instance of the HeaderCollection class. |
Methods
Method | Description |
---|---|
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:
Parameter | Type | Description |
---|---|---|
col | HeaderCollection | The 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:
Parameter | Type | Description |
---|---|---|
c | HeaderCollection | HeaderCollection for adding. |
add(String item)
public final void add(String item)
Adds the header without value
Parameters:
Parameter | Type | Description |
---|---|---|
item | java.lang.String |
add(String name, String value)
public final void add(String name, String value)
Adds the header.
Parameters:
Parameter | Type | Description |
---|---|---|
name | java.lang.String | The header name. |
value | java.lang.String | The header value. |
add_(String name, String value)
public void add_(String name, String value)
Adds the header.
Parameters:
Parameter | Type | Description |
---|---|---|
name | java.lang.String | The header name. |
value | java.lang.String | The 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:
Parameter | Type | Description |
---|---|---|
item | java.lang.String | A 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:
Parameter | Type | Description |
---|---|---|
dest | com.aspose.ms.System.Array | |
index | int |
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:
Parameter | Type | Description |
---|---|---|
array | java.lang.String[] | The destination of the elements copied from the current collection. |
arrayIndex | int | An integer that represents the index in array at which copying begins. |
equals(Object arg0)
public boolean equals(Object arg0)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | java.lang.Object |
Returns: boolean
get(int index)
public String get(int index)
Gets the value at the specified index.
Parameters:
Parameter | Type | Description |
---|---|---|
index | int | An 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:
Parameter | Type | Description |
---|---|---|
name | java.lang.String | The 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:
Parameter | Type | Description |
---|---|---|
name | java.lang.String | The 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:
Parameter | Type | Description |
---|---|---|
index | int | The 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:
Parameter | Type | Description |
---|---|---|
name | java.lang.String | The 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:
Parameter | Type | Description |
---|---|---|
index | int | The 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:
Parameter | Type | Description |
---|---|---|
name | java.lang.String | The 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:
Parameter | Type | Description |
---|---|---|
name | java.lang.String | The header name. |
value | java.lang.String | The 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:
Parameter | Type | Description |
---|---|---|
item | java.lang.String | The 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:
Parameter | Type | Description |
---|---|---|
name | java.lang.String | The header name. |
value | java.lang.String | The 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:
Parameter | Type | Description |
---|---|---|
name | java.lang.String | The name (key) in collection for an item. |
value | java.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:
Parameter | Type | Description |
---|---|---|
arg0 | long |
wait(long arg0, int arg1)
public final void wait(long arg0, int arg1)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | long | |
arg1 | int |