public class DefaultEntityTag extends DefaultBytesValue
value| Constructor and Description |
|---|
DefaultEntityTag(byte[] bytes)
Constructs an Entity-tag from a byte array value.
|
DefaultEntityTag(DefaultBytesValue bytes)
Constructs an Entity-tag from a Long value.
|
DefaultEntityTag(int intValue)
Constructs an Entity-tag from a Integer value.
|
DefaultEntityTag(long longValue)
Constructs an Entity-tag from a Long value.
|
DefaultEntityTag(String string)
Constructs an Entity-tag from a string using UTF-8 encoding.
|
DefaultEntityTag(String string,
int radix)
Constructs an Entity-tag from string interpreted as number using given radix.
|
| Modifier and Type | Method and Description |
|---|---|
static DefaultEntityTag |
valueOf(byte[] bytes)
Static function that creates Entity-tag from byte array.
|
static DefaultEntityTag |
valueOf(int intValue)
Static function that creates Entity-tag from Integer.
|
static DefaultEntityTag |
valueOf(long longValue)
Static function that creates Entity-tag from Long.
|
static DefaultEntityTag |
valueOf(String string)
Static function that creates Entity-tag from string using utf-8 representation.
|
static DefaultEntityTag |
valueOf(String string,
int radix)
Static function that creates Entity-tag from string interpreted as number using given radix.
|
getValue, getValueAsHex, getValueAsNumber, getValueAsStringcompareTo, equals, hashCode, toStringpublic DefaultEntityTag(byte[] bytes)
throws OptionValueException
bytes - The byte array containing the Entity-tag valueOptionValueException - When given array has length that is not 1..8 bytespublic DefaultEntityTag(String string) throws OptionValueException
string - contains the string representation of the Entity-tag value.OptionValueException - when given string does not represent a Entity-tag length of 1..8 bytespublic DefaultEntityTag(String string, int radix) throws OptionValueException
string - contains the string representation of the Entity-tag value.OptionValueException - when given string does not represent a Entity-tag length of 1..8 bytesOptionValueException - when given string cannot be converted to bytes.public DefaultEntityTag(int intValue)
throws OptionValueException
intValue - The value to create an Entity-tag from.OptionValueException - When intValue is invalid.public DefaultEntityTag(long longValue)
throws OptionValueException
longValue - The value to create an Entity-tag from.OptionValueException - When longValue <= 0.public DefaultEntityTag(DefaultBytesValue bytes) throws OptionValueException
bytes - The value to create an Entity-tag from.OptionValueException - When longValue <= 0.public static DefaultEntityTag valueOf(byte[] bytes) throws OptionValueException
bytes - The byte array containing Entity-tag value.OptionValueException - when byte array was empty or too large.public static DefaultEntityTag valueOf(int intValue) throws OptionValueException
intValue - The integer value to create Entity-tag from.OptionValueException - when byte array was empty or too large.public static DefaultEntityTag valueOf(long longValue) throws OptionValueException
longValue - The long value to create Entity-tag from.OptionValueException - When longValue <= 0.public static DefaultEntityTag valueOf(String string) throws OptionValueException
string - the string to create Entity-tag from.OptionValueException - when given string was too large.public static DefaultEntityTag valueOf(String string, int radix) throws OptionValueException
string - the string to create Entity-tag from.OptionValueException - when given string cannot be converted.Copyright © 2019–2024 Teslanet.nl. All rights reserved.