Home / Class/ RedisCodecTestUtil Class — netty Architecture

RedisCodecTestUtil Class — netty Architecture

Architecture documentation for the RedisCodecTestUtil class in RedisCodecTestUtil.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  7780936d_6d69_c632_9959_ec2c08777c9d["RedisCodecTestUtil"]
  37a5cd2d_0f58_4732_a83c_66460678a87a["RedisCodecTestUtil.java"]
  7780936d_6d69_c632_9959_ec2c08777c9d -->|defined in| 37a5cd2d_0f58_4732_a83c_66460678a87a
  0d23b0d2_53b4_6ed1_059a_a55bb8a75e71["RedisCodecTestUtil()"]
  7780936d_6d69_c632_9959_ec2c08777c9d -->|method| 0d23b0d2_53b4_6ed1_059a_a55bb8a75e71
  692f323c_79e6_a46b_2ac6_88ccd331c71b["bytesOf()"]
  7780936d_6d69_c632_9959_ec2c08777c9d -->|method| 692f323c_79e6_a46b_2ac6_88ccd331c71b
  d1c1205d_c6e2_5bd2_2522_35aaaa74be96["String()"]
  7780936d_6d69_c632_9959_ec2c08777c9d -->|method| d1c1205d_c6e2_5bd2_2522_35aaaa74be96
  b12b236f_c967_a1c3_2751_a39383cdc709["ByteBuf()"]
  7780936d_6d69_c632_9959_ec2c08777c9d -->|method| b12b236f_c967_a1c3_2751_a39383cdc709

Relationship Graph

Source Code

codec-redis/src/test/java/io/netty/handler/codec/redis/RedisCodecTestUtil.java lines 23–53

final class RedisCodecTestUtil {

    private RedisCodecTestUtil() {
    }

    static byte[] bytesOf(long value) {
        return bytesOf(Long.toString(value));
    }

    static byte[] bytesOf(String s) {
        return s.getBytes(CharsetUtil.UTF_8);
    }

    static byte[] bytesOf(ByteBuf buf) {
        byte[] data = new byte[buf.readableBytes()];
        buf.readBytes(data);
        return data;
    }

    static String stringOf(ByteBuf buf) {
        return new String(bytesOf(buf));
    }

    static ByteBuf byteBufOf(String s) {
        return byteBufOf(bytesOf(s));
    }

    static ByteBuf byteBufOf(byte[] data) {
        return Unpooled.wrappedBuffer(data);
    }
}

Frequently Asked Questions

What is the RedisCodecTestUtil class?
RedisCodecTestUtil is a class in the netty codebase, defined in codec-redis/src/test/java/io/netty/handler/codec/redis/RedisCodecTestUtil.java.
Where is RedisCodecTestUtil defined?
RedisCodecTestUtil is defined in codec-redis/src/test/java/io/netty/handler/codec/redis/RedisCodecTestUtil.java at line 23.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free