| Modifier and Type | Class and Description |
|---|---|
| public abstract static class | Utils.
type for which is conversion defined. T>Define to |
| Modifier and Type | Field and Description |
|---|---|
| private static final List | |
| private static final Logger |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public static ByteBuffer | Returns: concatenation.first buffer. buffer, ByteBuffer second buffer. buffer1, int incoming buffer size. Concatenation length cannot be bigger than this value. incomingBufferSize, int buffer step size. BUFFER_STEP_SIZE)Concatenates two buffers into one. |
| private static void | |
| private static void | |
| public static < object type. T> void | checkNotNull(T
object to check. reference, String name of parameter to be formatted into localized message of thrown parameterName)IllegalArgumentException.Check for null. |
| public static < item type. T> String | Returns: singleString containing all items from provided list.to be serialized. list)Creates single |
| public static < type to be converted. T> String | Returns: serialized list.list of values. list, Utils.strignifier used for conversion. When stringifiernull, Object#toString() method will be
used.Convert list of values to singe |
| public static < type of value to be retrieved. T> T | |
| public static < type of value to be retrieved. T> T | Returns: typed value ornull if property is not set or value is not assignable.property map. properties, final String key of value to be retrieved. key, final Class<T> type of value to be retrieved. type, final T value returned when record does not exist in supplied map. defaultValue)Get typed property from generic property map. |
| public static byte[] | Returns: array of bytes containing the bytes from the position to the limit of theByteBuffer.where the bytes are taken from. buffer)Creates the array of bytes containing the bytes from the position to the limit of the |
| public static < type to be converted. T> List | Returns: converted list.list to be converted. list, Utils.strignifier used for conversion. When stringifiernull, Object#toString() method will be
used.Get list of strings from List<T>. |
| public static int | |
| public static int | |
| public static List | Returns: split list of values.string containing header values. headerValue)Parse header value - splits multiple values (quoted, unquoted) separated by comma. |
| public static Date | Returns: ADate parsed from the string.String value to be parsed. stringValue)Parse HTTP date. |
| public static String | Returns: stringified upgrade request.upgrade request to be formatted. upgradeRequest)Converts upgrade request to a HTTP-formatted string. |
| public static String | Returns: stringified upgrade request.upgrade request to be formatted. upgradeResponse)Converts upgrade response to a HTTP-formatted string. |
| public static byte[] | |
| public static long | Returns: converted value.to be converted. bytes, int start index. start, int end index. end)Convert |
| public static List | |
| public static List |
| FILTERED_HEADERS | back to summary |
|---|---|
| private static final List<String> FILTERED_HEADERS | |
| LOGGER | back to summary |
|---|---|
| private static final Logger LOGGER | |
| Utils | back to summary |
|---|---|
| public Utils() | |
| appendBuffers | back to summary |
|---|---|
| public static ByteBuffer appendBuffers(ByteBuffer buffer, ByteBuffer buffer1, int incomingBufferSize, int BUFFER_STEP_SIZE) Concatenates two buffers into one. If buffer given as first argument has enough space for putting the other one, it will be done and the original buffer will be returned. Otherwise new buffer will be created.
| |
| appendHeader | back to summary |
|---|---|
| private static void appendHeader(StringBuilder message, String key, String value) | |
| appendHeaders | back to summary |
|---|---|
| private static void appendHeaders(StringBuilder message, Map<String, List<String>> headers) | |
| checkNotNull | back to summary |
|---|---|
| public static <T> void checkNotNull(T reference, String parameterName) Check for null. Throws
| |
| getHeaderFromList | back to summary |
|---|---|
| public static <T> String getHeaderFromList(List<T> list) Creates single | |
| getHeaderFromList | back to summary |
|---|---|
| public static <T> String getHeaderFromList(List<T> list, Utils. Convert list of values to singe
| |
| getProperty | back to summary |
|---|---|
| public static <T> T getProperty(Map<String, Object> properties, String key, Class<T> type) Get typed property from generic property map. | |
| getProperty | back to summary |
|---|---|
| public static <T> T getProperty(final Map<String, Object> properties, final String key, final Class<T> type, final T defaultValue) Get typed property from generic property map.
| |
| getRemainingArray | back to summary |
|---|---|
| public static byte[] getRemainingArray(ByteBuffer buffer) Creates the array of bytes containing the bytes from the position to the limit of the
| |
| getStringList | back to summary |
|---|---|
| public static <T> List Get list of strings from List<T>.
| |
| getWsPort | back to summary |
|---|---|
| public static int getWsPort(URI uri) Get port from provided
Expected schemes are
| |
| getWsPort | back to summary |
|---|---|
| public static int getWsPort(URI uri, String scheme) Get port from provided
Expected schemes are | |
| parseHeaderValue | back to summary |
|---|---|
| public static List Parse header value - splits multiple values (quoted, unquoted) separated by comma. | |
| parseHttpDate | back to summary |
|---|---|
| public static Date parseHttpDate(String stringValue) throws ParseException Parse HTTP date. HTTP applications have historically allowed three different formats for the representation of date/time stamps:
| |
| stringifyUpgradeRequest | back to summary |
|---|---|
| public static String stringifyUpgradeRequest(UpgradeRequest upgradeRequest) Converts upgrade request to a HTTP-formatted string.
| |
| stringifyUpgradeResponse | back to summary |
|---|---|
| public static String stringifyUpgradeResponse(UpgradeResponse upgradeResponse) Converts upgrade response to a HTTP-formatted string.
| |
| toArray | back to summary |
|---|---|
| public static byte[] toArray(long value) Convert
| |
| toLong | back to summary |
|---|---|
| public static long toLong(byte[] bytes, int start, int end) Convert
| |
| toString | back to summary |
|---|---|
| public static List | |
| toString | back to summary |
|---|---|
| public static List | |
String conversion for various types.
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv abstract String |
| Stringifier | back to summary |
|---|---|
| public Stringifier() | |
| toString | back to summary |
|---|---|
| pack-priv abstract String toString(T t) Convert object to | |