public final class Utils10 extends Object
| 限定符和类型 | 方法和说明 |
|---|---|
static String |
byteArrayOutputStreamToString(ByteArrayOutputStream baos,
Charset charset)
Converts the buffer's contents into a string by decoding the bytes using
the specified
charset. |
static boolean |
getTcpQuickack(Socket socket)
Returns the value of TCP_QUICKACK option.
|
static boolean |
setTcpQuickack(Socket socket,
boolean value)
Sets the value of TCP_QUICKACK option.
|
public static String byteArrayOutputStreamToString(ByteArrayOutputStream baos, Charset charset)
charset.baos - the buffer to decodecharset - the charset to usepublic static boolean getTcpQuickack(Socket socket) throws IOException
socket - the socketIOException - on I/O exceptionUnsupportedOperationException - if TCP_QUICKACK is not supportedpublic static boolean setTcpQuickack(Socket socket, boolean value)
socket - the socketvalue - the value to setCopyright © 2022. All rights reserved.