public final class Utils10
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
byteArrayOutputStreamToString(java.io.ByteArrayOutputStream baos,
java.nio.charset.Charset charset)
Converts the buffer's contents into a string by decoding the bytes using
the specified
charset. |
static boolean |
getTcpQuickack(java.net.Socket socket)
Returns the value of TCP_QUICKACK option.
|
static boolean |
setTcpQuickack(java.net.Socket socket,
boolean value)
Sets the value of TCP_QUICKACK option.
|
public static java.lang.String byteArrayOutputStreamToString(java.io.ByteArrayOutputStream baos,
java.nio.charset.Charset charset)
charset.baos - the buffer to decodecharset - the charset to usepublic static boolean getTcpQuickack(java.net.Socket socket)
throws java.io.IOException
socket - the socketjava.io.IOException - on I/O exceptionjava.lang.UnsupportedOperationException - if TCP_QUICKACK is not supportedpublic static boolean setTcpQuickack(java.net.Socket socket,
boolean value)
socket - the socketvalue - the value to set