java.io.Serializable
, java.lang.Comparable<WarcRecord.Type>
public static enum WarcRecord.Type extends java.lang.Enum<WarcRecord.Type>
Modifier and Type | Method | Description |
---|---|---|
static java.lang.reflect.Method |
fromPayloadMethod(org.apache.http.Header header) |
Returns the factory method to be used to create a record from the payload given an header specifying the type.
|
java.lang.String |
toString() |
|
static WarcRecord.Type |
valueOf(java.lang.String name) |
Returns the enum constant of this type with the specified name.
|
static WarcRecord.Type |
valueOf(org.apache.http.Header header) |
Determines the WARC record type given the
WARC-Type header. |
static WarcRecord.Type[] |
values() |
Returns an array containing the constants of this enum type, in
the order they are declared.
|
static org.apache.http.Header |
warcHeader(WarcRecord.Type type) |
Creates the
WARC-Type header of the given record type. |
public static final WarcRecord.Type REQUEST
public static final WarcRecord.Type RESPONSE
public static final WarcRecord.Type WARCINFO
public static WarcRecord.Type[] values()
for (WarcRecord.Type c : WarcRecord.Type.values()) System.out.println(c);
public static WarcRecord.Type valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic java.lang.String toString()
toString
in class java.lang.Enum<WarcRecord.Type>
public static org.apache.http.Header warcHeader(WarcRecord.Type type)
WARC-Type
header of the given record type.type
- the record type.public static WarcRecord.Type valueOf(org.apache.http.Header header)
WARC-Type
header.header
- the header.public static java.lang.reflect.Method fromPayloadMethod(org.apache.http.Header header)
header
- the header.