ttomcat-1778514358873.zip-extract/_dependencies/maven/com.h2database_h2-2.2.220/org/h2/util/Utils10.java

Path
ttomcat-1778514358873.zip-extract/_dependencies/maven/com.h2database_h2-2.2.220/org/h2/util/Utils10.java
Status
scanned
Type
file
Name
Utils10.java
Extension
.java
Programming language
Java
Mime type
text/x-java
File type
Java source, ASCII text
Tag

      
    
Rootfs path

      
    
Size
2254 (2.2 KB)
MD5
f3f18fb6e284fd402e043eda6b6cfbac
SHA1
971cb0aa5160f34235056c546d072e99dc8f427b
SHA256
542cace361eb62ec5e82ac1e84ec1662ee70332d71953ffa49d4711cb42e1de2
SHA512

      
    
SHA1_git
96302ea0244b65685f411e9aa1a4ed7c45c0465c
Is binary

      
    
Is text
True
Is archive

      
    
Is media

      
    
Is legal

      
    
Is manifest

      
    
Is readme

      
    
Is top level

      
    
Is key file

      
    
Utils10.java | 2.2 KB |

/* * Copyright 2004-2023 H2 Group. Multiple-Licensed under the MPL 2.0, * and the EPL 1.0 (https://h2database.com/html/license.html). * Initial Developer: H2 Group */ package org.h2.util; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.UnsupportedEncodingException; import java.net.Socket; import java.nio.charset.Charset; /** * 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. */ public final class Utils10 { /* * Signatures of methods should match with * h2/src/java10/src/org/h2/util/Utils10.java and precompiled * h2/src/java10/precompiled/org/h2/util/Utils10.class. */ /** * Converts the buffer's contents into a string by decoding the bytes using * the specified {@link java.nio.charset.Charset charset}. * * @param baos * the buffer to decode * @param charset * the charset to use * @return the decoded string */ public static String byteArrayOutputStreamToString(ByteArrayOutputStream baos, Charset charset) { try { return baos.toString(charset.name()); } catch (UnsupportedEncodingException e) { throw new RuntimeException(e); } } /** * Returns the value of TCP_QUICKACK option. * * @param socket * the socket * @return the current value of TCP_QUICKACK option * @throws IOException * on I/O exception * @throws UnsupportedOperationException * if TCP_QUICKACK is not supported */ public static boolean getTcpQuickack(Socket socket) throws IOException { throw new UnsupportedOperationException(); } /** * Sets the value of TCP_QUICKACK option. * * @param socket * the socket * @param value * the value to set * @return whether operation was successful */ public static boolean setTcpQuickack(Socket socket, boolean value) { // The default implementation does nothing return false; } private Utils10() { } }
Detected license expression
mpl-2.0 AND epl-1.0
Detected license expression (SPDX)
MPL-2.0 AND EPL-1.0
Percentage of license text
3.8
Copyrights
- end_line: 2
  copyright: Copyright 2004-2023 H2 Group. Multiple-Licensed
  start_line: 2
Holders
- holder: H2 Group. Multiple-Licensed
  end_line: 2
  start_line: 2
Authors

      
    
License detections License expression License expression SPDX
mpl_2_0_and_epl_1_0-796bf8d7-f485-3520-923d-e6a4b1ecd2f3 mpl-2.0 AND epl-1.0 MPL-2.0 AND EPL-1.0
URL Start line End line
https://h2database.com/html/license.html 3 3
Package URL License Primary language
pkg:osgi/com.h2database.source@2.2.220