Compare commits

...

5 Commits

Author SHA1 Message Date
Andrea Cavalli 0863c6f0d4 Remove deprecated api 2021-09-04 16:44:56 +02:00
Andrea Cavalli 033d4995f8 Bugfixes 2021-09-04 02:18:49 +02:00
Andrea Cavalli 0a8709ac3f Edit url 2021-09-04 01:59:26 +02:00
Andrea Cavalli 70f4906902 Rename package from io.netty to io.netty5 2021-09-04 01:58:45 +02:00
Andrea Cavalli 73fd9c9392 Rename package from io.netty to io.netty5 2021-09-03 23:36:02 +02:00
2939 changed files with 2173 additions and 369857 deletions

View File

@ -33,32 +33,32 @@ Netty can be used in modular JDK9+ applications as a collection of automatic mod
reverse-DNS style, and are derived from subproject names rather than root packages due to historical reasons. They
are listed below:
* `io.netty.all`
* `io.netty.buffer`
* `io.netty.codec`
* `io.netty.codec.dns`
* `io.netty.codec.haproxy`
* `io.netty.codec.http`
* `io.netty.codec.http2`
* `io.netty.codec.memcache`
* `io.netty.codec.mqtt`
* `io.netty.codec.redis`
* `io.netty.codec.smtp`
* `io.netty.codec.socks`
* `io.netty.codec.stomp`
* `io.netty.codec.xml`
* `io.netty.common`
* `io.netty.handler`
* `io.netty.handler.proxy`
* `io.netty.resolver`
* `io.netty.resolver.dns`
* `io.netty.transport`
* `io.netty.transport.epoll` (`native` omitted - reserved keyword in Java)
* `io.netty.transport.kqueue` (`native` omitted - reserved keyword in Java)
* `io.netty.transport.unix.common` (`native` omitted - reserved keyword in Java)
* `io.netty.transport.rxtx`
* `io.netty.transport.sctp`
* `io.netty.transport.udt`
* `io.netty5.all`
* `io.netty5.buffer`
* `io.netty5.codec`
* `io.netty5.codec.dns`
* `io.netty5.codec.haproxy`
* `io.netty5.codec.http`
* `io.netty5.codec.http2`
* `io.netty5.codec.memcache`
* `io.netty5.codec.mqtt`
* `io.netty5.codec.redis`
* `io.netty5.codec.smtp`
* `io.netty5.codec.socks`
* `io.netty5.codec.stomp`
* `io.netty5.codec.xml`
* `io.netty5.common`
* `io.netty5.handler`
* `io.netty5.handler.proxy`
* `io.netty5.resolver`
* `io.netty5.resolver.dns`
* `io.netty5.transport`
* `io.netty5.transport.epoll` (`native` omitted - reserved keyword in Java)
* `io.netty5.transport.kqueue` (`native` omitted - reserved keyword in Java)
* `io.netty5.transport.unix.common` (`native` omitted - reserved keyword in Java)
* `io.netty5.transport.rxtx`
* `io.netty5.transport.sctp`
* `io.netty5.transport.udt`

View File

@ -18,7 +18,7 @@
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>io.netty</groupId>
<groupId>io.netty5</groupId>
<artifactId>netty-parent</artifactId>
<version>5.0.0.Final-SNAPSHOT</version>
</parent>
@ -37,7 +37,7 @@
<dependencyManagement>
<dependencies>
<dependency>
<groupId>io.netty</groupId>
<groupId>io.netty5</groupId>
<artifactId>netty-bom</artifactId>
<version>${project.version}</version>
<type>pom</type>
@ -57,75 +57,9 @@
<url>https://oss.sonatype.org/service/local/repositories/${stagingRepositoryId}/content/</url>
</repository>
</repositories>
<dependencies>
<!-- Depend on all our native jars -->
<!-- As this is executed on either macOS or Linux we directly need to specify the classifier -->
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>netty-transport-native-epoll</artifactId>
<classifier>linux-x86_64</classifier>
<scope>compile</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>netty-transport-native-epoll</artifactId>
<classifier>linux-aarch_64</classifier>
<scope>compile</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>netty-transport-native-kqueue</artifactId>
<classifier>osx-x86_64</classifier>
<scope>compile</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>netty-resolver-dns-native-macos</artifactId>
<classifier>osx-x86_64</classifier>
<scope>compile</scope>
<optional>true</optional>
</dependency>
</dependencies>
</profile>
<profile>
<id>uber-snapshot</id>
<dependencies>
<!-- Depend on all our native jars -->
<!-- As this is executed on either macOS or Linux we directly need to specify the classifier -->
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>netty-transport-native-epoll</artifactId>
<classifier>linux-x86_64</classifier>
<scope>compile</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>netty-transport-native-epoll</artifactId>
<classifier>linux-aarch_64</classifier>
<scope>compile</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>netty-transport-native-kqueue</artifactId>
<classifier>osx-x86_64</classifier>
<scope>compile</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>netty-resolver-dns-native-macos</artifactId>
<classifier>osx-x86_64</classifier>
<scope>compile</scope>
<optional>true</optional>
</dependency>
</dependencies>
</profile>
<!-- The linux profile will only include the native jar for epol to the all jar.
@ -138,30 +72,6 @@
<family>linux</family>
</os>
</activation>
<dependencies>
<!-- All release modules -->
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>netty-transport-native-epoll</artifactId>
<version>${project.version}</version>
<classifier>${jni.classifier}</classifier>
<scope>compile</scope>
<optional>true</optional>
</dependency>
<!-- Just include the classes for the other platform so these are at least present in the netty-all artifact -->
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>netty-transport-native-kqueue</artifactId>
<scope>compile</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>netty-resolver-dns-native-macos</artifactId>
<scope>compile</scope>
<optional>true</optional>
</dependency>
</dependencies>
</profile>
<!-- The mac, openbsd and freebsd profile will only include the native jar for epol to the all jar.
If you want to also include the native jar for kqueue use -Puber.
@ -173,32 +83,6 @@
<family>mac</family>
</os>
</activation>
<dependencies>
<!-- All release modules -->
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>netty-transport-native-kqueue</artifactId>
<version>${project.version}</version>
<classifier>${jni.classifier}</classifier>
<scope>compile</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>netty-resolver-dns-native-macos</artifactId>
<version>${project.version}</version>
<classifier>${jni.classifier}</classifier>
<scope>compile</scope>
<optional>true</optional>
</dependency>
<!-- Just include the classes for the other platform so these are at least present in the netty-all artifact -->
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>netty-transport-native-epoll</artifactId>
<scope>compile</scope>
<optional>true</optional>
</dependency>
</dependencies>
</profile>
<profile>
<id>freebsd</id>
@ -208,30 +92,6 @@
<name>freebsd</name>
</os>
</activation>
<dependencies>
<!-- All release modules -->
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>netty-transport-native-kqueue</artifactId>
<version>${project.version}</version>
<classifier>${jni.classifier}</classifier>
<scope>compile</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>netty-resolver-dns-native-macos</artifactId>
<scope>compile</scope>
<optional>true</optional>
</dependency>
<!-- Just include the classes for the other platform so these are at least present in the netty-all artifact -->
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>netty-transport-native-epoll</artifactId>
<scope>compile</scope>
<optional>true</optional>
</dependency>
</dependencies>
</profile>
<profile>
<id>openbsd</id>
@ -241,30 +101,6 @@
<name>openbsd</name>
</os>
</activation>
<dependencies>
<!-- All release modules -->
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>netty-transport-native-kqueue</artifactId>
<version>${project.version}</version>
<classifier>${jni.classifier}</classifier>
<scope>compile</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>netty-resolver-dns-native-macos</artifactId>
<scope>compile</scope>
<optional>true</optional>
</dependency>
<!-- Just include the classes for the other platform so these are at least present in the netty-all artifact -->
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>netty-transport-native-epoll</artifactId>
<scope>compile</scope>
<optional>true</optional>
</dependency>
</dependencies>
</profile>
</profiles>
@ -276,120 +112,12 @@
<scope>compile</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>netty-codec</artifactId>
<scope>compile</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>netty-codec-dns</artifactId>
<scope>compile</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>netty-codec-haproxy</artifactId>
<scope>compile</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>netty-codec-http</artifactId>
<scope>compile</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>netty-codec-http2</artifactId>
<scope>compile</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>netty-codec-memcache</artifactId>
<scope>compile</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>netty-codec-mqtt</artifactId>
<scope>compile</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>netty-codec-redis</artifactId>
<scope>compile</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>netty-codec-smtp</artifactId>
<scope>compile</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>netty-codec-socks</artifactId>
<scope>compile</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>netty-codec-stomp</artifactId>
<scope>compile</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>netty-codec-xml</artifactId>
<scope>compile</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>netty-common</artifactId>
<scope>compile</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>netty-handler</artifactId>
<scope>compile</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>netty-handler-proxy</artifactId>
<scope>compile</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>netty-resolver</artifactId>
<scope>compile</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>netty-resolver-dns</artifactId>
<scope>compile</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>netty-transport</artifactId>
<scope>compile</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>netty-transport-sctp</artifactId>
<scope>compile</scope>
<optional>true</optional>
</dependency>
</dependencies>
<build>
@ -428,7 +156,7 @@
</goals>
<configuration>
<classifier>sources</classifier>
<includes>io/netty/**</includes>
<includes>io/netty5/**</includes>
<includeScope>runtime</includeScope>
<includeGroupIds>${project.groupId}</includeGroupIds>
<outputDirectory>${generatedSourceDir}</outputDirectory>
@ -443,8 +171,8 @@
<goal>unpack-dependencies</goal>
</goals>
<configuration>
<excludes>io/netty/internal/tcnative/**,io/netty/example/**,META-INF/native/libnetty_tcnative*,META-INF/native/include/**,META-INF/native/**/*.a</excludes>
<includes>io/netty/**,META-INF/native/**,META-INF/native-image/**</includes>
<excludes>io/netty5/internal/tcnative/**,io/netty5/example/**,META-INF/native/libnetty_tcnative*,META-INF/native/include/**,META-INF/native/**/*.a</excludes>
<includes>io/netty5/**,META-INF/native/**,META-INF/native-image/**</includes>
<includeScope>runtime</includeScope>
<includeGroupIds>${project.groupId}</includeGroupIds>
<outputDirectory>${project.build.outputDirectory}</outputDirectory>
@ -557,7 +285,7 @@
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
</manifest>
<manifestEntries>
<Automatic-Module-Name>io.netty.all</Automatic-Module-Name>
<Automatic-Module-Name>io.netty5.all</Automatic-Module-Name>
</manifestEntries>
<index>true</index>
</archive>

View File

@ -16,14 +16,15 @@
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.sonatype.oss</groupId>
<artifactId>oss-parent</artifactId>
<version>7</version>
<relativePath />
</parent>
<distributionManagement>
<repository>
<id>mchv-snapshot</id>
<name>MCHV Apache Snapshot Maven Packages Distribution</name>
<url>https://mvn.mchv.eu/repository/mchv-snapshot</url>
</repository>
</distributionManagement>
<groupId>io.netty</groupId>
<groupId>io.netty5</groupId>
<artifactId>netty-bom</artifactId>
<version>5.0.0.Final-SNAPSHOT</version>
<packaging>pom</packaging>
@ -67,236 +68,25 @@
<dependencies>
<!-- All release modules -->
<dependency>
<groupId>io.netty</groupId>
<groupId>io.netty5</groupId>
<artifactId>netty-buffer</artifactId>
<version>5.0.0.Final-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-codec</artifactId>
<version>5.0.0.Final-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-codec-dns</artifactId>
<version>5.0.0.Final-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-codec-haproxy</artifactId>
<version>5.0.0.Final-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-codec-http</artifactId>
<version>5.0.0.Final-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-codec-http2</artifactId>
<version>5.0.0.Final-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-codec-memcache</artifactId>
<version>5.0.0.Final-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-codec-mqtt</artifactId>
<version>5.0.0.Final-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-codec-redis</artifactId>
<version>5.0.0.Final-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-codec-smtp</artifactId>
<version>5.0.0.Final-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-codec-socks</artifactId>
<version>5.0.0.Final-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-codec-stomp</artifactId>
<version>5.0.0.Final-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-codec-xml</artifactId>
<version>5.0.0.Final-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<groupId>io.netty5</groupId>
<artifactId>netty-common</artifactId>
<version>5.0.0.Final-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<groupId>io.netty5</groupId>
<artifactId>netty-dev-tools</artifactId>
<version>5.0.0.Final-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-handler</artifactId>
<version>5.0.0.Final-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-handler-proxy</artifactId>
<version>5.0.0.Final-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-resolver</artifactId>
<version>5.0.0.Final-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-resolver-dns</artifactId>
<version>5.0.0.Final-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-transport</artifactId>
<version>5.0.0.Final-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-transport-sctp</artifactId>
<version>5.0.0.Final-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-example</artifactId>
<version>5.0.0.Final-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<groupId>io.netty5</groupId>
<artifactId>netty-all</artifactId>
<version>5.0.0.Final-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-resolver-dns-native-macos</artifactId>
<version>5.0.0.Final-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-resolver-dns-native-macos</artifactId>
<version>5.0.0.Final-SNAPSHOT</version>
<classifier>osx-x86_64</classifier>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-transport-native-unix-common</artifactId>
<version>5.0.0.Final-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-transport-native-unix-common</artifactId>
<version>5.0.0.Final-SNAPSHOT</version>
<classifier>linux-aarch_64</classifier>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-transport-native-unix-common</artifactId>
<version>5.0.0.Final-SNAPSHOT</version>
<classifier>linux-x86_64</classifier>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-transport-native-unix-common</artifactId>
<version>5.0.0.Final-SNAPSHOT</version>
<classifier>osx-x86_64</classifier>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-transport-native-epoll</artifactId>
<version>5.0.0.Final-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-transport-native-epoll</artifactId>
<version>5.0.0.Final-SNAPSHOT</version>
<classifier>linux-aarch_64</classifier>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-transport-native-epoll</artifactId>
<version>5.0.0.Final-SNAPSHOT</version>
<classifier>linux-x86_64</classifier>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-transport-native-kqueue</artifactId>
<version>5.0.0.Final-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-transport-native-kqueue</artifactId>
<version>5.0.0.Final-SNAPSHOT</version>
<classifier>osx-x86_64</classifier>
</dependency>
<!-- Add netty-tcnative* as well as users need to ensure they use the correct version -->
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-tcnative</artifactId>
<version>${tcnative.version}</version>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-tcnative</artifactId>
<version>${tcnative.version}</version>
<classifier>linux-x86_64</classifier>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-tcnative</artifactId>
<version>${tcnative.version}</version>
<classifier>linux-aarch_64</classifier>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-tcnative</artifactId>
<version>${tcnative.version}</version>
<classifier>osx-x86_64</classifier>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-tcnative-boringssl-static</artifactId>
<version>${tcnative.version}</version>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-tcnative-boringssl-static</artifactId>
<version>${tcnative.version}</version>
<classifier>linux-x86_64</classifier>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-tcnative-boringssl-static</artifactId>
<version>${tcnative.version}</version>
<classifier>linux-aarch_64</classifier>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-tcnative-boringssl-static</artifactId>
<version>${tcnative.version}</version>
<classifier>osx_64</classifier>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-tcnative-boringssl-static</artifactId>
<version>${tcnative.version}</version>
<classifier>windows_64</classifier>
</dependency>
</dependencies>
</dependencyManagement>
</project>

View File

@ -18,7 +18,7 @@
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>io.netty</groupId>
<groupId>io.netty5</groupId>
<artifactId>netty-parent</artifactId>
<version>5.0.0.Final-SNAPSHOT</version>
</parent>

View File

@ -13,19 +13,22 @@
* License for the specific language governing permissions and limitations
* under the License.
*/
package io.netty.buffer;
package io.netty5.buffer;
import io.netty.util.AsciiString;
import io.netty.util.ByteProcessor;
import io.netty.util.CharsetUtil;
import io.netty.util.IllegalReferenceCountException;
import io.netty.util.ResourceLeakDetector;
import io.netty.util.ResourceLeakDetectorFactory;
import io.netty.util.internal.StringUtil;
import io.netty.util.internal.SystemPropertyUtil;
import io.netty.util.internal.logging.InternalLogger;
import io.netty.util.internal.logging.InternalLoggerFactory;
import static io.netty5.util.internal.MathUtil.isOutOfBounds;
import static io.netty5.util.internal.ObjectUtil.checkPositiveOrZero;
import static java.util.Objects.requireNonNull;
import io.netty5.util.AsciiString;
import io.netty5.util.ByteProcessor;
import io.netty5.util.CharsetUtil;
import io.netty5.util.IllegalReferenceCountException;
import io.netty5.util.ResourceLeakDetector;
import io.netty5.util.ResourceLeakDetectorFactory;
import io.netty5.util.internal.StringUtil;
import io.netty5.util.internal.SystemPropertyUtil;
import io.netty5.util.internal.logging.InternalLogger;
import io.netty5.util.internal.logging.InternalLoggerFactory;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
@ -36,10 +39,6 @@ import java.nio.channels.GatheringByteChannel;
import java.nio.channels.ScatteringByteChannel;
import java.nio.charset.Charset;
import static io.netty.util.internal.MathUtil.isOutOfBounds;
import static io.netty.util.internal.ObjectUtil.checkPositiveOrZero;
import static java.util.Objects.requireNonNull;
/**
* A skeletal implementation of a buffer.
*/

View File

@ -14,15 +14,15 @@
* under the License.
*/
package io.netty.buffer;
package io.netty5.buffer;
import static io.netty.util.internal.ObjectUtil.checkPositiveOrZero;
import static io.netty5.util.internal.ObjectUtil.checkPositiveOrZero;
import io.netty.util.ResourceLeakDetector;
import io.netty.util.ResourceLeakTracker;
import io.netty.util.internal.MathUtil;
import io.netty.util.internal.PlatformDependent;
import io.netty.util.internal.StringUtil;
import io.netty5.util.ResourceLeakDetector;
import io.netty5.util.ResourceLeakTracker;
import io.netty5.util.internal.MathUtil;
import io.netty5.util.internal.PlatformDependent;
import io.netty5.util.internal.StringUtil;
/**
* Skeletal {@link ByteBufAllocator} implementation to extend.

View File

@ -14,7 +14,7 @@
* under the License.
*/
package io.netty.buffer;
package io.netty5.buffer;
import java.nio.ByteBuffer;

View File

@ -14,10 +14,9 @@
* under the License.
*/
package io.netty.buffer;
import io.netty.util.internal.ObjectPool.Handle;
package io.netty5.buffer;
import io.netty5.util.internal.ObjectPool.Handle;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;

View File

@ -14,12 +14,11 @@
* under the License.
*/
package io.netty.buffer;
package io.netty5.buffer;
import io.netty5.util.internal.ReferenceCountUpdater;
import java.util.concurrent.atomic.AtomicIntegerFieldUpdater;
import io.netty.util.internal.ReferenceCountUpdater;
/**
* Abstract base class for {@link ByteBuf} implementations that count references.
*/

View File

@ -13,10 +13,11 @@
* License for the specific language governing permissions and limitations
* under the License.
*/
package io.netty.buffer;
package io.netty5.buffer;
import io.netty.util.ByteProcessor;
import static io.netty5.util.internal.MathUtil.isOutOfBounds;
import io.netty5.util.ByteProcessor;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
@ -27,8 +28,6 @@ import java.nio.channels.GatheringByteChannel;
import java.nio.channels.ScatteringByteChannel;
import java.nio.charset.Charset;
import static io.netty.util.internal.MathUtil.isOutOfBounds;
abstract class AbstractUnpooledSlicedByteBuf extends AbstractDerivedByteBuf {
private final ByteBuf buffer;
private final int adjustment;

View File

@ -13,14 +13,13 @@
* License for the specific language governing permissions and limitations
* under the License.
*/
package io.netty.buffer;
package io.netty5.buffer;
import io.netty.util.internal.PlatformDependent;
import static io.netty5.util.internal.PlatformDependent.BIG_ENDIAN_NATIVE_ORDER;
import io.netty5.util.internal.PlatformDependent;
import java.nio.ByteOrder;
import static io.netty.util.internal.PlatformDependent.BIG_ENDIAN_NATIVE_ORDER;
/**
* Special {@link SwappedByteBuf} for {@link ByteBuf}s that is using unsafe.
*/

View File

@ -14,15 +14,14 @@
* under the License.
*/
package io.netty.buffer;
import io.netty.util.ByteProcessor;
import io.netty.util.ResourceLeakDetector;
import io.netty.util.ResourceLeakTracker;
import io.netty.util.internal.SystemPropertyUtil;
import io.netty.util.internal.logging.InternalLogger;
import io.netty.util.internal.logging.InternalLoggerFactory;
package io.netty5.buffer;
import io.netty5.util.ByteProcessor;
import io.netty5.util.ResourceLeakDetector;
import io.netty5.util.ResourceLeakTracker;
import io.netty5.util.internal.SystemPropertyUtil;
import io.netty5.util.internal.logging.InternalLogger;
import io.netty5.util.internal.logging.InternalLoggerFactory;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;

View File

@ -13,11 +13,10 @@
* License for the specific language governing permissions and limitations
* under the License.
*/
package io.netty.buffer;
import io.netty.util.ByteProcessor;
import io.netty.util.ReferenceCounted;
package io.netty5.buffer;
import io.netty5.util.ByteProcessor;
import io.netty5.util.ReferenceCounted;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;

View File

@ -13,7 +13,7 @@
* License for the specific language governing permissions and limitations
* under the License.
*/
package io.netty.buffer;
package io.netty5.buffer;
/**
* Implementations are responsible to allocate buffers. Implementations of this interface are expected to be

View File

@ -13,7 +13,7 @@
* License for the specific language governing permissions and limitations
* under the License.
*/
package io.netty.buffer;
package io.netty5.buffer;
public interface ByteBufAllocatorMetric {
/**

View File

@ -13,7 +13,7 @@
* License for the specific language governing permissions and limitations
* under the License.
*/
package io.netty.buffer;
package io.netty5.buffer;
public interface ByteBufAllocatorMetricProvider {

View File

@ -13,7 +13,7 @@
* License for the specific language governing permissions and limitations
* under the License.
*/
package io.netty.buffer;
package io.netty5.buffer;
/**
* An interface that can be implemented by any object that know how to turn itself into a {@link ByteBuf}.

View File

@ -13,9 +13,9 @@
* License for the specific language governing permissions and limitations
* under the License.
*/
package io.netty.buffer;
package io.netty5.buffer;
import io.netty.util.ReferenceCounted;
import io.netty5.util.ReferenceCounted;
/**
* A packet which is send or receive.

View File

@ -13,14 +13,13 @@
* License for the specific language governing permissions and limitations
* under the License.
*/
package io.netty.buffer;
package io.netty5.buffer;
import static io.netty5.util.internal.ObjectUtil.checkPositiveOrZero;
import static java.util.Objects.requireNonNull;
import static io.netty.util.internal.ObjectUtil.checkPositiveOrZero;
import io.netty.util.ReferenceCounted;
import io.netty.util.internal.StringUtil;
import io.netty5.util.ReferenceCounted;
import io.netty5.util.internal.StringUtil;
import java.io.DataInput;
import java.io.DataInputStream;
import java.io.EOFException;

View File

@ -13,12 +13,11 @@
* License for the specific language governing permissions and limitations
* under the License.
*/
package io.netty.buffer;
package io.netty5.buffer;
import static java.util.Objects.requireNonNull;
import io.netty.util.CharsetUtil;
import io.netty5.util.CharsetUtil;
import java.io.DataOutput;
import java.io.DataOutputStream;
import java.io.IOException;

View File

@ -14,9 +14,9 @@
* under the License.
*/
package io.netty.buffer;
package io.netty5.buffer;
import io.netty.util.ByteProcessor;
import io.netty5.util.ByteProcessor;
/**
* @deprecated Use {@link ByteProcessor}.

View File

@ -13,22 +13,27 @@
* License for the specific language governing permissions and limitations
* under the License.
*/
package io.netty.buffer;
package io.netty5.buffer;
import io.netty.util.AsciiString;
import io.netty.util.ByteProcessor;
import io.netty.util.CharsetUtil;
import io.netty.util.IllegalReferenceCountException;
import io.netty.util.concurrent.FastThreadLocal;
import io.netty.util.internal.MathUtil;
import io.netty.util.internal.ObjectPool;
import io.netty.util.internal.ObjectPool.Handle;
import io.netty.util.internal.PlatformDependent;
import io.netty.util.internal.StringUtil;
import io.netty.util.internal.SystemPropertyUtil;
import io.netty.util.internal.logging.InternalLogger;
import io.netty.util.internal.logging.InternalLoggerFactory;
import static io.netty5.util.internal.MathUtil.isOutOfBounds;
import static io.netty5.util.internal.ObjectUtil.checkPositiveOrZero;
import static io.netty5.util.internal.StringUtil.NEWLINE;
import static io.netty5.util.internal.StringUtil.isSurrogate;
import static java.util.Objects.requireNonNull;
import io.netty5.util.AsciiString;
import io.netty5.util.ByteProcessor;
import io.netty5.util.CharsetUtil;
import io.netty5.util.IllegalReferenceCountException;
import io.netty5.util.concurrent.FastThreadLocal;
import io.netty5.util.internal.MathUtil;
import io.netty5.util.internal.ObjectPool;
import io.netty5.util.internal.ObjectPool.Handle;
import io.netty5.util.internal.PlatformDependent;
import io.netty5.util.internal.StringUtil;
import io.netty5.util.internal.SystemPropertyUtil;
import io.netty5.util.internal.logging.InternalLogger;
import io.netty5.util.internal.logging.InternalLoggerFactory;
import java.io.IOException;
import java.io.OutputStream;
import java.nio.ByteBuffer;
@ -43,12 +48,6 @@ import java.nio.charset.CodingErrorAction;
import java.util.Arrays;
import java.util.Locale;
import static io.netty.util.internal.MathUtil.isOutOfBounds;
import static io.netty.util.internal.ObjectUtil.checkPositiveOrZero;
import static io.netty.util.internal.StringUtil.NEWLINE;
import static io.netty.util.internal.StringUtil.isSurrogate;
import static java.util.Objects.requireNonNull;
/**
* A collection of utility methods that is related with handling {@link ByteBuf},
* such as the generation of hex dump and swapping an integer's byte order.

View File

@ -13,16 +13,15 @@
* License for the specific language governing permissions and limitations
* under the License.
*/
package io.netty.buffer;
package io.netty5.buffer;
import static java.util.Objects.requireNonNull;
import io.netty.util.ByteProcessor;
import io.netty.util.IllegalReferenceCountException;
import io.netty.util.ReferenceCountUtil;
import io.netty.util.internal.EmptyArrays;
import io.netty.util.internal.RecyclableArrayList;
import io.netty5.util.ByteProcessor;
import io.netty5.util.IllegalReferenceCountException;
import io.netty5.util.ReferenceCountUtil;
import io.netty5.util.internal.EmptyArrays;
import io.netty5.util.internal.RecyclableArrayList;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;

View File

@ -13,11 +13,11 @@
* License for the specific language governing permissions and limitations
* under the License.
*/
package io.netty.buffer;
package io.netty5.buffer;
import static java.util.Objects.requireNonNull;
import io.netty.util.internal.StringUtil;
import io.netty5.util.internal.StringUtil;
/**
* Default implementation of a {@link ByteBufHolder} that holds it's data in a {@link ByteBuf}.

View File

@ -13,10 +13,9 @@
* License for the specific language governing permissions and limitations
* under the License.
*/
package io.netty.buffer;
import io.netty.util.ByteProcessor;
package io.netty5.buffer;
import io.netty5.util.ByteProcessor;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;

View File

@ -14,16 +14,15 @@
* under the License.
*/
package io.netty.buffer;
package io.netty5.buffer;
import static io.netty.util.internal.ObjectUtil.checkPositiveOrZero;
import static io.netty5.util.internal.ObjectUtil.checkPositiveOrZero;
import static java.util.Objects.requireNonNull;
import io.netty.util.ByteProcessor;
import io.netty.util.internal.EmptyArrays;
import io.netty.util.internal.PlatformDependent;
import io.netty.util.internal.StringUtil;
import io.netty5.util.ByteProcessor;
import io.netty5.util.internal.EmptyArrays;
import io.netty5.util.internal.PlatformDependent;
import io.netty5.util.internal.StringUtil;
import java.io.InputStream;
import java.io.OutputStream;
import java.nio.ByteBuffer;

View File

@ -13,11 +13,10 @@
* License for the specific language governing permissions and limitations
* under the License.
*/
package io.netty.buffer;
import io.netty.util.internal.EmptyArrays;
import io.netty.util.internal.RecyclableArrayList;
package io.netty5.buffer;
import io.netty5.util.internal.EmptyArrays;
import io.netty5.util.internal.RecyclableArrayList;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;

View File

@ -13,7 +13,7 @@
* License for the specific language governing permissions and limitations
* under the License.
*/
package io.netty.buffer;
package io.netty5.buffer;
/**
* Utility class for heap buffers.

View File

@ -14,11 +14,12 @@
* under the License.
*/
package io.netty.buffer;
package io.netty5.buffer;
import io.netty.util.internal.PlatformDependent;
import io.netty.util.internal.StringUtil;
import static java.lang.Math.max;
import io.netty5.util.internal.PlatformDependent;
import io.netty5.util.internal.StringUtil;
import java.nio.ByteBuffer;
import java.util.ArrayList;
import java.util.Collections;
@ -26,9 +27,6 @@ import java.util.List;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.LongAdder;
import static io.netty.buffer.PoolChunk.isSubpage;
import static java.lang.Math.max;
abstract class PoolArena<T> extends SizeClasses implements PoolArenaMetric {
static final boolean HAS_UNSAFE = PlatformDependent.hasUnsafe();
@ -235,7 +233,7 @@ abstract class PoolArena<T> extends SizeClasses implements PoolArenaMetric {
}
private static SizeClass sizeClass(long handle) {
return isSubpage(handle) ? SizeClass.Small : SizeClass.Normal;
return PoolChunk.isSubpage(handle) ? SizeClass.Small : SizeClass.Normal;
}
void freeChunk(PoolChunk<T> chunk, long handle, int normCapacity, SizeClass sizeClass, ByteBuffer nioBuffer,

View File

@ -14,7 +14,7 @@
* under the License.
*/
package io.netty.buffer;
package io.netty5.buffer;
import java.util.List;

View File

@ -13,11 +13,10 @@
* License for the specific language governing permissions and limitations
* under the License.
*/
package io.netty.buffer;
import io.netty.util.internal.LongLongHashMap;
import io.netty.util.internal.LongPriorityQueue;
package io.netty5.buffer;
import io.netty5.util.internal.LongLongHashMap;
import io.netty5.util.internal.LongPriorityQueue;
import java.nio.ByteBuffer;
import java.util.ArrayDeque;
import java.util.Deque;

View File

@ -14,19 +14,18 @@
* under the License.
*/
package io.netty.buffer;
package io.netty5.buffer;
import io.netty.util.internal.StringUtil;
import static java.lang.Math.max;
import static java.lang.Math.min;
import io.netty5.util.internal.StringUtil;
import java.nio.ByteBuffer;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import static java.lang.Math.*;
import java.nio.ByteBuffer;
final class PoolChunkList<T> implements PoolChunkListMetric {
private static final Iterator<PoolChunkMetric> EMPTY_METRICS = Collections.<PoolChunkMetric>emptyList().iterator();
private final PoolArena<T> arena;

View File

@ -13,7 +13,7 @@
* License for the specific language governing permissions and limitations
* under the License.
*/
package io.netty.buffer;
package io.netty5.buffer;
/**
* Metrics for a list of chunks.

View File

@ -13,7 +13,7 @@
* License for the specific language governing permissions and limitations
* under the License.
*/
package io.netty.buffer;
package io.netty5.buffer;
/**
* Metrics for a chunk.

View File

@ -14,13 +14,12 @@
* under the License.
*/
package io.netty.buffer;
package io.netty5.buffer;
import static io.netty.buffer.PoolChunk.RUN_OFFSET_SHIFT;
import static io.netty.buffer.PoolChunk.SIZE_SHIFT;
import static io.netty.buffer.PoolChunk.IS_USED_SHIFT;
import static io.netty.buffer.PoolChunk.IS_SUBPAGE_SHIFT;
import static io.netty.buffer.SizeClasses.LOG2_QUANTUM;
import static io.netty5.buffer.PoolChunk.IS_SUBPAGE_SHIFT;
import static io.netty5.buffer.PoolChunk.IS_USED_SHIFT;
import static io.netty5.buffer.PoolChunk.RUN_OFFSET_SHIFT;
import static io.netty5.buffer.PoolChunk.SIZE_SHIFT;
final class PoolSubpage<T> implements PoolSubpageMetric {
@ -59,7 +58,7 @@ final class PoolSubpage<T> implements PoolSubpageMetric {
this.runOffset = runOffset;
this.runSize = runSize;
this.elemSize = elemSize;
bitmap = new long[runSize >>> 6 + LOG2_QUANTUM]; // runSize / 64 / QUANTUM
bitmap = new long[runSize >>> 6 + SizeClasses.LOG2_QUANTUM]; // runSize / 64 / QUANTUM
doNotDestroy = true;
if (elemSize != 0) {

View File

@ -13,7 +13,7 @@
* License for the specific language governing permissions and limitations
* under the License.
*/
package io.netty.buffer;
package io.netty5.buffer;
/**
* Metrics for a sub-page.

View File

@ -14,19 +14,18 @@
* under the License.
*/
package io.netty.buffer;
package io.netty5.buffer;
import static io.netty.util.internal.ObjectUtil.checkPositiveOrZero;
import io.netty.buffer.PoolArena.SizeClass;
import io.netty.util.internal.MathUtil;
import io.netty.util.internal.ObjectPool;
import io.netty.util.internal.ObjectPool.Handle;
import io.netty.util.internal.PlatformDependent;
import io.netty.util.internal.logging.InternalLogger;
import io.netty.util.internal.logging.InternalLoggerFactory;
import static io.netty5.util.internal.ObjectUtil.checkPositiveOrZero;
import io.netty5.buffer.PoolArena.SizeClass;
import io.netty5.util.internal.MathUtil;
import io.netty5.util.internal.ObjectPool;
import io.netty5.util.internal.ObjectPool.Handle;
import io.netty5.util.internal.PlatformDependent;
import io.netty5.util.internal.logging.InternalLogger;
import io.netty5.util.internal.logging.InternalLoggerFactory;
import java.nio.ByteBuffer;
import java.util.ArrayList;
import java.util.List;

View File

@ -14,10 +14,9 @@
* under the License.
*/
package io.netty.buffer;
import io.netty.util.internal.ObjectPool.Handle;
package io.netty5.buffer;
import io.netty5.util.internal.ObjectPool.Handle;
import java.io.IOException;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;

View File

@ -14,21 +14,20 @@
* under the License.
*/
package io.netty.buffer;
package io.netty5.buffer;
import static io.netty.util.internal.ObjectUtil.checkPositiveOrZero;
import io.netty.util.NettyRuntime;
import io.netty.util.concurrent.EventExecutor;
import io.netty.util.concurrent.FastThreadLocal;
import io.netty.util.concurrent.FastThreadLocalThread;
import io.netty.util.internal.PlatformDependent;
import io.netty.util.internal.StringUtil;
import io.netty.util.internal.SystemPropertyUtil;
import io.netty.util.internal.ThreadExecutorMap;
import io.netty.util.internal.logging.InternalLogger;
import io.netty.util.internal.logging.InternalLoggerFactory;
import static io.netty5.util.internal.ObjectUtil.checkPositiveOrZero;
import io.netty5.util.NettyRuntime;
import io.netty5.util.concurrent.EventExecutor;
import io.netty5.util.concurrent.FastThreadLocal;
import io.netty5.util.concurrent.FastThreadLocalThread;
import io.netty5.util.internal.PlatformDependent;
import io.netty5.util.internal.StringUtil;
import io.netty5.util.internal.SystemPropertyUtil;
import io.netty5.util.internal.ThreadExecutorMap;
import io.netty5.util.internal.logging.InternalLogger;
import io.netty5.util.internal.logging.InternalLoggerFactory;
import java.nio.ByteBuffer;
import java.util.ArrayList;
import java.util.Collections;

View File

@ -13,10 +13,9 @@
* License for the specific language governing permissions and limitations
* under the License.
*/
package io.netty.buffer;
import io.netty.util.internal.StringUtil;
package io.netty5.buffer;
import io.netty5.util.internal.StringUtil;
import java.util.List;
/**

View File

@ -14,11 +14,10 @@
* under the License.
*/
package io.netty.buffer;
import io.netty.util.internal.ObjectPool;
import io.netty.util.internal.ObjectPool.Handle;
package io.netty5.buffer;
import io.netty5.util.internal.ObjectPool;
import io.netty5.util.internal.ObjectPool.Handle;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;

View File

@ -14,12 +14,11 @@
* under the License.
*/
package io.netty.buffer;
import io.netty.util.ByteProcessor;
import io.netty.util.internal.ObjectPool;
import io.netty.util.internal.ObjectPool.Handle;
package io.netty5.buffer;
import io.netty5.util.ByteProcessor;
import io.netty5.util.internal.ObjectPool;
import io.netty5.util.internal.ObjectPool.Handle;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;

View File

@ -12,12 +12,11 @@
* under the License.
*/
package io.netty.buffer;
import io.netty.util.internal.ObjectPool;
import io.netty.util.internal.ObjectPool.Handle;
import io.netty.util.internal.PlatformDependent;
package io.netty5.buffer;
import io.netty5.util.internal.ObjectPool;
import io.netty5.util.internal.ObjectPool.Handle;
import io.netty5.util.internal.PlatformDependent;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;

View File

@ -14,12 +14,13 @@
* under the License.
*/
package io.netty.buffer;
package io.netty5.buffer;
import io.netty.util.ByteProcessor;
import io.netty.util.internal.ObjectPool;
import io.netty.util.internal.ObjectPool.Handle;
import static io.netty5.buffer.AbstractUnpooledSlicedByteBuf.checkSliceOutOfBounds;
import io.netty5.util.ByteProcessor;
import io.netty5.util.internal.ObjectPool;
import io.netty5.util.internal.ObjectPool.Handle;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
@ -28,8 +29,6 @@ import java.nio.channels.FileChannel;
import java.nio.channels.GatheringByteChannel;
import java.nio.channels.ScatteringByteChannel;
import static io.netty.buffer.AbstractUnpooledSlicedByteBuf.checkSliceOutOfBounds;
final class PooledSlicedByteBuf extends AbstractPooledDerivedByteBuf {
private static final ObjectPool<PooledSlicedByteBuf> RECYCLER = ObjectPool.newPool(PooledSlicedByteBuf::new);

View File

@ -14,12 +14,11 @@
* under the License.
*/
package io.netty.buffer;
import io.netty.util.internal.ObjectPool;
import io.netty.util.internal.ObjectPool.Handle;
import io.netty.util.internal.PlatformDependent;
package io.netty5.buffer;
import io.netty5.util.internal.ObjectPool;
import io.netty5.util.internal.ObjectPool.Handle;
import io.netty5.util.internal.PlatformDependent;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;

View File

@ -13,11 +13,11 @@
* License for the specific language governing permissions and limitations
* under the License.
*/
package io.netty.buffer;
package io.netty5.buffer;
import io.netty.util.internal.ObjectPool;
import io.netty.util.internal.ObjectPool.Handle;
import io.netty.util.internal.PlatformDependent;
import io.netty5.util.internal.ObjectPool;
import io.netty5.util.internal.ObjectPool.Handle;
import io.netty5.util.internal.PlatformDependent;
final class PooledUnsafeHeapByteBuf extends PooledHeapByteBuf {

View File

@ -13,10 +13,9 @@
* License for the specific language governing permissions and limitations
* under the License.
*/
package io.netty.buffer;
import io.netty.util.ByteProcessor;
package io.netty5.buffer;
import io.netty5.util.ByteProcessor;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;

View File

@ -13,10 +13,9 @@
* License for the specific language governing permissions and limitations
* under the License.
*/
package io.netty.buffer;
import io.netty.util.internal.StringUtil;
package io.netty5.buffer;
import io.netty5.util.internal.StringUtil;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;

View File

@ -13,15 +13,14 @@
* License for the specific language governing permissions and limitations
* under the License.
*/
package io.netty.buffer;
package io.netty5.buffer;
import static java.util.Objects.requireNonNull;
import io.netty5.util.internal.PlatformDependent;
import java.nio.ByteBuffer;
import io.netty.util.internal.PlatformDependent;
/**
* Read-only ByteBuf which wraps a read-only direct ByteBuffer and use unsafe for best performance.

View File

@ -14,13 +14,12 @@
* under the License.
*/
package io.netty.buffer;
package io.netty5.buffer;
import static java.util.Objects.requireNonNull;
import io.netty.util.ResourceLeakDetector;
import io.netty.util.ResourceLeakTracker;
import io.netty5.util.ResourceLeakDetector;
import io.netty5.util.ResourceLeakTracker;
import java.nio.ByteOrder;
class SimpleLeakAwareByteBuf extends WrappedByteBuf {

View File

@ -13,12 +13,11 @@
* License for the specific language governing permissions and limitations
* under the License.
*/
package io.netty.buffer;
package io.netty5.buffer;
import static java.util.Objects.requireNonNull;
import io.netty.util.ResourceLeakTracker;
import io.netty5.util.ResourceLeakTracker;
import java.nio.ByteOrder;
class SimpleLeakAwareCompositeByteBuf extends WrappedCompositeByteBuf {

View File

@ -13,9 +13,9 @@
* License for the specific language governing permissions and limitations
* under the License.
*/
package io.netty.buffer;
package io.netty5.buffer;
import static io.netty.buffer.PoolThreadCache.*;
import static io.netty5.buffer.PoolThreadCache.log2;
/**
* SizeClasses requires {@code pageShifts} to be defined prior to inclusion,

View File

@ -13,7 +13,7 @@
* License for the specific language governing permissions and limitations
* under the License.
*/
package io.netty.buffer;
package io.netty5.buffer;
/**
* Expose metrics for an SizeClasses.

View File

@ -13,7 +13,7 @@
* License for the specific language governing permissions and limitations
* under the License.
*/
package io.netty.buffer;
package io.netty5.buffer;
/**
* A derived buffer which exposes its parent's sub-region only. It is

View File

@ -13,12 +13,11 @@
* License for the specific language governing permissions and limitations
* under the License.
*/
package io.netty.buffer;
package io.netty5.buffer;
import static java.util.Objects.requireNonNull;
import io.netty.util.ByteProcessor;
import io.netty5.util.ByteProcessor;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;

View File

@ -13,14 +13,13 @@
* License for the specific language governing permissions and limitations
* under the License.
*/
package io.netty.buffer;
package io.netty5.buffer;
import static java.util.Objects.requireNonNull;
import io.netty.buffer.CompositeByteBuf.ByteWrapper;
import io.netty.util.CharsetUtil;
import io.netty.util.internal.PlatformDependent;
import io.netty5.buffer.CompositeByteBuf.ByteWrapper;
import io.netty5.util.CharsetUtil;
import io.netty5.util.internal.PlatformDependent;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
import java.nio.CharBuffer;
@ -36,7 +35,7 @@ import java.util.Arrays;
* This classes is intended to be used with Java 5 static import statement:
*
* <pre>
* import static io.netty.buffer.{@link Unpooled}.*;
* import static io.netty5.buffer.{@link Unpooled}.*;
*
* {@link ByteBuf} heapBuffer = buffer(128);
* {@link ByteBuf} directBuffer = directBuffer(256);

View File

@ -13,11 +13,10 @@
* License for the specific language governing permissions and limitations
* under the License.
*/
package io.netty.buffer;
import io.netty.util.internal.PlatformDependent;
import io.netty.util.internal.StringUtil;
package io.netty5.buffer;
import io.netty5.util.internal.PlatformDependent;
import io.netty5.util.internal.StringUtil;
import java.nio.ByteBuffer;
import java.util.concurrent.atomic.LongAdder;

View File

@ -13,13 +13,12 @@
* License for the specific language governing permissions and limitations
* under the License.
*/
package io.netty.buffer;
package io.netty5.buffer;
import static io.netty.util.internal.ObjectUtil.checkPositiveOrZero;
import static io.netty5.util.internal.ObjectUtil.checkPositiveOrZero;
import static java.util.Objects.requireNonNull;
import io.netty.util.internal.PlatformDependent;
import io.netty5.util.internal.PlatformDependent;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;

View File

@ -13,7 +13,7 @@
* License for the specific language governing permissions and limitations
* under the License.
*/
package io.netty.buffer;
package io.netty5.buffer;
/**
* {@link DuplicatedByteBuf} implementation that can do optimizations because it knows the duplicated buffer

View File

@ -13,13 +13,12 @@
* License for the specific language governing permissions and limitations
* under the License.
*/
package io.netty.buffer;
package io.netty5.buffer;
import static java.util.Objects.requireNonNull;
import io.netty.util.internal.EmptyArrays;
import io.netty.util.internal.PlatformDependent;
import io.netty5.util.internal.EmptyArrays;
import io.netty5.util.internal.PlatformDependent;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;

View File

@ -13,7 +13,7 @@
* License for the specific language governing permissions and limitations
* under the License.
*/
package io.netty.buffer;
package io.netty5.buffer;
/**
* A special {@link AbstractUnpooledSlicedByteBuf} that can make optimizations because it knows the sliced buffer is of

View File

@ -13,10 +13,9 @@
* License for the specific language governing permissions and limitations
* under the License.
*/
package io.netty.buffer;
import io.netty.util.internal.PlatformDependent;
package io.netty5.buffer;
import io.netty5.util.internal.PlatformDependent;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;

View File

@ -13,9 +13,9 @@
* License for the specific language governing permissions and limitations
* under the License.
*/
package io.netty.buffer;
package io.netty5.buffer;
import io.netty.util.internal.PlatformDependent;
import io.netty5.util.internal.PlatformDependent;
/**
* Big endian Java heap buffer implementation. It is recommended to use

View File

@ -13,10 +13,9 @@
* License for the specific language governing permissions and limitations
* under the License.
*/
package io.netty.buffer;
import io.netty.util.internal.PlatformDependent;
package io.netty5.buffer;
import io.netty5.util.internal.PlatformDependent;
import java.nio.ByteBuffer;
class UnpooledUnsafeNoCleanerDirectByteBuf extends UnpooledUnsafeDirectByteBuf {

View File

@ -13,7 +13,7 @@
* License for the specific language governing permissions and limitations
* under the License.
*/
package io.netty.buffer;
package io.netty5.buffer;
import static java.util.Objects.requireNonNull;

View File

@ -13,10 +13,13 @@
* License for the specific language governing permissions and limitations
* under the License.
*/
package io.netty.buffer;
package io.netty5.buffer;
import io.netty.util.internal.PlatformDependent;
import static io.netty5.util.internal.MathUtil.isOutOfBounds;
import static io.netty5.util.internal.PlatformDependent.BIG_ENDIAN_NATIVE_ORDER;
import static java.util.Objects.requireNonNull;
import io.netty5.util.internal.PlatformDependent;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
@ -24,10 +27,6 @@ import java.nio.ByteBuffer;
import java.nio.ByteOrder;
import java.nio.ReadOnlyBufferException;
import static io.netty.util.internal.MathUtil.isOutOfBounds;
import static io.netty.util.internal.PlatformDependent.BIG_ENDIAN_NATIVE_ORDER;
import static java.util.Objects.requireNonNull;
/**
* All operations get and set as {@link ByteOrder#BIG_ENDIAN}.
*/

View File

@ -14,9 +14,9 @@
* under the License.
*/
package io.netty.buffer;
package io.netty5.buffer;
import io.netty.util.internal.PlatformDependent;
import io.netty5.util.internal.PlatformDependent;
/**
* Special {@link SwappedByteBuf} for {@link ByteBuf}s that are backed by a {@code memoryAddress}.

View File

@ -14,9 +14,9 @@
* under the License.
*/
package io.netty.buffer;
package io.netty5.buffer;
import io.netty.util.internal.PlatformDependent;
import io.netty5.util.internal.PlatformDependent;
/**
* Special {@link SwappedByteBuf} for {@link ByteBuf}s that use unsafe to access the byte array.

View File

@ -14,13 +14,12 @@
* under the License.
*/
package io.netty.buffer;
package io.netty5.buffer;
import static java.util.Objects.requireNonNull;
import io.netty.util.ByteProcessor;
import io.netty.util.internal.StringUtil;
import io.netty5.util.ByteProcessor;
import io.netty5.util.internal.StringUtil;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;

View File

@ -13,10 +13,9 @@
* License for the specific language governing permissions and limitations
* under the License.
*/
package io.netty.buffer;
import io.netty.util.ByteProcessor;
package io.netty5.buffer;
import io.netty5.util.ByteProcessor;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;

View File

@ -13,10 +13,9 @@
* License for the specific language governing permissions and limitations
* under the License.
*/
package io.netty.buffer;
import io.netty.util.internal.PlatformDependent;
package io.netty5.buffer;
import io.netty5.util.internal.PlatformDependent;
import java.nio.ByteBuffer;
final class WrappedUnpooledUnsafeDirectByteBuf extends UnpooledUnsafeDirectByteBuf {

View File

@ -13,7 +13,7 @@
* License for the specific language governing permissions and limitations
* under the License.
*/
package io.netty.buffer.api;
package io.netty5.buffer.api;
/**
* An object used by {@linkplain BufferAllocator buffer allocators} to communicate desirable properties of an

View File

@ -13,9 +13,9 @@
* License for the specific language governing permissions and limitations
* under the License.
*/
package io.netty.buffer.api;
package io.netty5.buffer.api;
import io.netty.util.internal.UnstableApi;
import io.netty5.util.internal.UnstableApi;
/**
* Methods for accessing and controlling the internals of an allocator.

View File

@ -13,7 +13,7 @@
* License for the specific language governing permissions and limitations
* under the License.
*/
package io.netty.buffer.api;
package io.netty5.buffer.api;
import java.nio.ByteBuffer;

View File

@ -13,7 +13,7 @@
* License for the specific language governing permissions and limitations
* under the License.
*/
package io.netty.buffer.api;
package io.netty5.buffer.api;
/**
* This interface is just the primitive data accessor methods that {@link Buffer} exposes.

View File

@ -13,10 +13,9 @@
* License for the specific language governing permissions and limitations
* under the License.
*/
package io.netty.buffer.api;
import io.netty.buffer.api.pool.PooledBufferAllocator;
package io.netty5.buffer.api;
import io.netty5.buffer.api.pool.PooledBufferAllocator;
import java.util.function.Supplier;
/**

View File

@ -13,7 +13,7 @@
* License for the specific language governing permissions and limitations
* under the License.
*/
package io.netty.buffer.api;
package io.netty5.buffer.api;
/**
* An exception thrown when an operation is attempted on a {@link Buffer} when it has been closed.

View File

@ -13,16 +13,15 @@
* License for the specific language governing permissions and limitations
* under the License.
*/
package io.netty.buffer.api;
import io.netty.buffer.api.internal.ResourceSupport;
import io.netty.buffer.api.internal.Statics;
import java.lang.invoke.VarHandle;
import java.util.Objects;
package io.netty5.buffer.api;
import static java.lang.invoke.MethodHandles.lookup;
import io.netty5.buffer.api.internal.ResourceSupport;
import io.netty5.buffer.api.internal.Statics;
import java.lang.invoke.VarHandle;
import java.util.Objects;
/**
* The {@link BufferHolder} is an abstract class that simplifies the implementation of objects that themselves contain
* a {@link Buffer} instance.

View File

@ -13,7 +13,7 @@
* License for the specific language governing permissions and limitations
* under the License.
*/
package io.netty.buffer.api;
package io.netty5.buffer.api;
/**
* An exception thrown when an operation is attempted on a {@linkplain Buffer#readOnly() read-only} {@link Buffer}.

View File

@ -13,7 +13,7 @@
* License for the specific language governing permissions and limitations
* under the License.
*/
package io.netty.buffer.api;
package io.netty5.buffer.api;
import java.lang.invoke.VarHandle;

View File

@ -13,7 +13,7 @@
* License for the specific language governing permissions and limitations
* under the License.
*/
package io.netty.buffer.api;
package io.netty5.buffer.api;
import java.nio.ByteBuffer;

View File

@ -12,9 +12,9 @@
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/
package io.netty.buffer.api;
package io.netty5.buffer.api;
import io.netty.util.ByteProcessor;
import io.netty5.util.ByteProcessor;
/**
* The ByteCursor scans through a sequence of bytes.

View File

@ -13,11 +13,14 @@
* License for the specific language governing permissions and limitations
* under the License.
*/
package io.netty.buffer.api;
package io.netty5.buffer.api;
import io.netty.buffer.api.internal.ResourceSupport;
import io.netty.buffer.api.internal.Statics;
import static io.netty5.buffer.api.internal.Statics.bufferIsClosed;
import static io.netty5.buffer.api.internal.Statics.bufferIsReadOnly;
import static java.lang.Math.addExact;
import io.netty5.buffer.api.internal.ResourceSupport;
import io.netty5.buffer.api.internal.Statics;
import java.nio.ByteBuffer;
import java.nio.ReadOnlyBufferException;
import java.util.Arrays;
@ -27,10 +30,6 @@ import java.util.Objects;
import java.util.Set;
import java.util.stream.Stream;
import static io.netty.buffer.api.internal.Statics.bufferIsClosed;
import static io.netty.buffer.api.internal.Statics.bufferIsReadOnly;
import static java.lang.Math.addExact;
/**
* The {@code CompositeBuffer} is a concrete {@link Buffer} implementation that make a number of other buffers appear
* as one. A composite buffer behaves the same as a normal, non-composite buffer in every way, so you normally don't

View File

@ -12,24 +12,23 @@
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/
package io.netty.buffer.api;
package io.netty5.buffer.api;
import io.netty.util.internal.PlatformDependent;
import io.netty.util.internal.SystemPropertyUtil;
import io.netty.util.internal.logging.InternalLogger;
import io.netty.util.internal.logging.InternalLoggerFactory;
import static io.netty5.buffer.api.BufferAllocator.offHeapPooled;
import static io.netty5.buffer.api.BufferAllocator.offHeapUnpooled;
import static io.netty5.buffer.api.BufferAllocator.onHeapPooled;
import static io.netty5.buffer.api.BufferAllocator.onHeapUnpooled;
import static io.netty5.util.internal.ObjectUtil.checkNotNullWithIAE;
import static io.netty5.util.internal.PlatformDependent.directBufferPreferred;
import static java.lang.Runtime.getRuntime;
import io.netty5.util.internal.PlatformDependent;
import io.netty5.util.internal.SystemPropertyUtil;
import io.netty5.util.internal.logging.InternalLogger;
import io.netty5.util.internal.logging.InternalLoggerFactory;
import java.util.Locale;
import java.util.function.Supplier;
import static io.netty.buffer.api.BufferAllocator.offHeapPooled;
import static io.netty.buffer.api.BufferAllocator.offHeapUnpooled;
import static io.netty.buffer.api.BufferAllocator.onHeapPooled;
import static io.netty.buffer.api.BufferAllocator.onHeapUnpooled;
import static io.netty.util.internal.ObjectUtil.checkNotNullWithIAE;
import static io.netty.util.internal.PlatformDependent.directBufferPreferred;
import static java.lang.Runtime.getRuntime;
/**
* A {@link BufferAllocator} which is {@link #close() disposed} when the {@link Runtime} is shutdown.
*/

View File

@ -13,7 +13,7 @@
* License for the specific language governing permissions and limitations
* under the License.
*/
package io.netty.buffer.api;
package io.netty5.buffer.api;
/**
* An interface used by {@link Resource} instances to implement their resource disposal mechanics.

View File

@ -13,15 +13,14 @@
* License for the specific language governing permissions and limitations
* under the License.
*/
package io.netty.buffer.api;
package io.netty5.buffer.api;
import io.netty.buffer.api.internal.Statics;
import static io.netty5.buffer.api.internal.Statics.NO_OP_DROP;
import static io.netty5.buffer.api.internal.Statics.allocatorClosedException;
import io.netty5.buffer.api.internal.Statics;
import java.util.function.Supplier;
import static io.netty.buffer.api.internal.Statics.NO_OP_DROP;
import static io.netty.buffer.api.internal.Statics.allocatorClosedException;
class ManagedBufferAllocator implements BufferAllocator, AllocatorControl {
private final MemoryManager manager;
private final AllocationType allocationType;

View File

@ -13,14 +13,13 @@
* License for the specific language governing permissions and limitations
* under the License.
*/
package io.netty.buffer.api;
import io.netty.buffer.api.internal.MemoryManagerLoader;
import io.netty.buffer.api.internal.MemoryManagerOverride;
import io.netty.util.internal.UnstableApi;
import io.netty.util.internal.logging.InternalLogger;
import io.netty.util.internal.logging.InternalLoggerFactory;
package io.netty5.buffer.api;
import io.netty5.buffer.api.internal.MemoryManagerLoader;
import io.netty5.buffer.api.internal.MemoryManagerOverride;
import io.netty5.util.internal.UnstableApi;
import io.netty5.util.internal.logging.InternalLogger;
import io.netty5.util.internal.logging.InternalLoggerFactory;
import java.lang.ref.Cleaner;
import java.util.Optional;
import java.util.ServiceConfigurationError;

View File

@ -13,7 +13,7 @@
* License for the specific language governing permissions and limitations
* under the License.
*/
package io.netty.buffer.api;
package io.netty5.buffer.api;
/**
* This interface encapsulates the ownership of a {@link Resource}, and exposes a method that may be used to transfer

View File

@ -13,7 +13,7 @@
* License for the specific language governing permissions and limitations
* under the License.
*/
package io.netty.buffer.api;
package io.netty5.buffer.api;
import java.nio.ByteBuffer;

View File

@ -13,7 +13,7 @@
* License for the specific language governing permissions and limitations
* under the License.
*/
package io.netty.buffer.api;
package io.netty5.buffer.api;
import java.nio.ByteBuffer;

View File

@ -13,7 +13,7 @@
* License for the specific language governing permissions and limitations
* under the License.
*/
package io.netty.buffer.api;
package io.netty5.buffer.api;
/**
* A resource that has a life-time, and can be {@linkplain #close() closed}.

View File

@ -13,10 +13,9 @@
* License for the specific language governing permissions and limitations
* under the License.
*/
package io.netty.buffer.api;
import io.netty.buffer.api.internal.SendFromSupplier;
package io.netty5.buffer.api;
import io.netty5.buffer.api.internal.SendFromSupplier;
import java.util.function.Function;
import java.util.function.Supplier;

View File

@ -13,7 +13,7 @@
* License for the specific language governing permissions and limitations
* under the License.
*/
package io.netty.buffer.api;
package io.netty5.buffer.api;
/**
* Standard implementations of {@link AllocationType} that all {@linkplain MemoryManager memory managers} should

View File

@ -13,7 +13,7 @@
* License for the specific language governing permissions and limitations
* under the License.
*/
package io.netty.buffer.api;
package io.netty5.buffer.api;
import java.nio.ByteBuffer;

View File

@ -13,7 +13,7 @@
* License for the specific language governing permissions and limitations
* under the License.
*/
package io.netty.buffer.api;
package io.netty5.buffer.api;
import java.nio.ByteBuffer;

View File

@ -13,13 +13,14 @@
* License for the specific language governing permissions and limitations
* under the License.
*/
package io.netty.buffer.api.adaptor;
package io.netty5.buffer.api.adaptor;
import io.netty.buffer.ByteBufConvertible;
import io.netty.util.ReferenceCounted;
import io.netty5.buffer.ByteBuf;
import io.netty5.buffer.ByteBufConvertible;
import io.netty5.util.ReferenceCounted;
/**
* Interfaces that are required for an object to stand-in for a {@link io.netty.buffer.ByteBuf} in Netty.
* Interfaces that are required for an object to stand-in for a {@link ByteBuf} in Netty.
*/
public interface BufferIntegratable extends ByteBufConvertible, ReferenceCounted {
}

View File

@ -13,23 +13,22 @@
* License for the specific language governing permissions and limitations
* under the License.
*/
package io.netty.buffer.api.adaptor;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.ByteBufAllocator;
import io.netty.buffer.ByteBufConvertible;
import io.netty.buffer.ByteBufUtil;
import io.netty.buffer.DuplicatedByteBuf;
import io.netty.buffer.SlicedByteBuf;
import io.netty.buffer.SwappedByteBuf;
import io.netty.buffer.Unpooled;
import io.netty.buffer.api.Buffer;
import io.netty.buffer.api.BufferAllocator;
import io.netty.buffer.api.internal.ResourceSupport;
import io.netty.buffer.api.internal.Statics;
import io.netty.util.ByteProcessor;
import io.netty.util.IllegalReferenceCountException;
package io.netty5.buffer.api.adaptor;
import io.netty5.buffer.ByteBuf;
import io.netty5.buffer.ByteBufAllocator;
import io.netty5.buffer.ByteBufConvertible;
import io.netty5.buffer.ByteBufUtil;
import io.netty5.buffer.DuplicatedByteBuf;
import io.netty5.buffer.SlicedByteBuf;
import io.netty5.buffer.SwappedByteBuf;
import io.netty5.buffer.Unpooled;
import io.netty5.buffer.api.Buffer;
import io.netty5.buffer.api.BufferAllocator;
import io.netty5.buffer.api.internal.ResourceSupport;
import io.netty5.buffer.api.internal.Statics;
import io.netty5.util.ByteProcessor;
import io.netty5.util.IllegalReferenceCountException;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
@ -42,9 +41,6 @@ import java.nio.charset.Charset;
import java.util.Objects;
import java.util.concurrent.atomic.AtomicReference;
import static io.netty.buffer.api.internal.Statics.acquire;
import static io.netty.buffer.api.internal.Statics.isOwned;
public final class ByteBufAdaptor extends ByteBuf {
private final ByteBufAllocatorAdaptor alloc;
private final Buffer buffer;
@ -114,7 +110,7 @@ public final class ByteBufAdaptor extends ByteBuf {
try {
buffer.ensureWritable(diff);
} catch (IllegalStateException e) {
if (!isOwned((ResourceSupport<?, ?>) buffer)) {
if (!Statics.isOwned((ResourceSupport<?, ?>) buffer)) {
throw new UnsupportedOperationException(e);
}
throw e;
@ -261,7 +257,7 @@ public final class ByteBufAdaptor extends ByteBuf {
return 1;
}
try {
if (isOwned((ResourceSupport<?, ?>) buffer)) {
if (Statics.isOwned((ResourceSupport<?, ?>) buffer)) {
// Good place.
buffer.ensureWritable(minWritableBytes);
} else {
@ -1601,7 +1597,7 @@ public final class ByteBufAdaptor extends ByteBuf {
@Override
public ByteBuf retain(int increment) {
for (int i = 0; i < increment; i++) {
acquire((ResourceSupport<?, ?>) buffer);
Statics.acquire((ResourceSupport<?, ?>) buffer);
}
return this;
}
@ -1619,7 +1615,7 @@ public final class ByteBufAdaptor extends ByteBuf {
var rc = (ResourceSupport<?, ?>) buffer;
return Statics.countBorrows(rc);
}
return isOwned((ResourceSupport<?, ?>) buffer)? 0 : 1;
return Statics.isOwned((ResourceSupport<?, ?>) buffer)? 0 : 1;
}
@Override

View File

@ -13,17 +13,17 @@
* License for the specific language governing permissions and limitations
* under the License.
*/
package io.netty.buffer.api.adaptor;
package io.netty5.buffer.api.adaptor;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.ByteBufAllocator;
import io.netty.buffer.CompositeByteBuf;
import io.netty.buffer.api.Buffer;
import io.netty.buffer.api.BufferAllocator;
import io.netty.buffer.api.internal.AdaptableBuffer;
import io.netty.util.internal.PlatformDependent;
import static io.netty5.util.internal.ObjectUtil.checkPositiveOrZero;
import static io.netty.util.internal.ObjectUtil.checkPositiveOrZero;
import io.netty5.buffer.ByteBuf;
import io.netty5.buffer.ByteBufAllocator;
import io.netty5.buffer.CompositeByteBuf;
import io.netty5.buffer.api.Buffer;
import io.netty5.buffer.api.BufferAllocator;
import io.netty5.buffer.api.internal.AdaptableBuffer;
import io.netty5.util.internal.PlatformDependent;
import java.util.Objects;
public class ByteBufAllocatorAdaptor implements ByteBufAllocator, AutoCloseable {

View File

@ -15,6 +15,6 @@
*/
/**
* Helpers for integrating with the existing {@link io.netty.buffer.ByteBuf} API.
* Helpers for integrating with the existing {@link io.netty5.buffer.ByteBuf} API.
*/
package io.netty.buffer.api.adaptor;
package io.netty5.buffer.api.adaptor;

Some files were not shown because too many files have changed in this diff Show More