Package org.h2.util
Class Utils10
java.lang.Object
org.h2.util.Utils10
Utilities with specialized implementations for Java 10 and later versions.
This class contains basic implementations for Java 8 and 9 and it is
overridden in multi-release JARs.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic String
byteArrayOutputStreamToString
(ByteArrayOutputStream baos, Charset charset) Converts the buffer's contents into a string by decoding the bytes using the specifiedcharset
.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.
-
Constructor Details
-
Utils10
private Utils10()
-
-
Method Details
-
byteArrayOutputStreamToString
Converts the buffer's contents into a string by decoding the bytes using the specifiedcharset
.- Parameters:
baos
- the buffer to decodecharset
- the charset to use- Returns:
- the decoded string
-
getTcpQuickack
Returns the value of TCP_QUICKACK option.- Parameters:
socket
- the socket- Returns:
- the current value of TCP_QUICKACK option
- Throws:
IOException
- on I/O exceptionUnsupportedOperationException
- if TCP_QUICKACK is not supported
-
setTcpQuickack
Sets the value of TCP_QUICKACK option.- Parameters:
socket
- the socketvalue
- the value to set- Returns:
- whether operation was successful
-