org.apache.coyote.http2

## Class ByteUtil

- java.lang.Object
- - org.apache.coyote.http2.ByteUtil

-     public class ByteUtil
      extends Object

  Utility class for extracting values from byte arrays.

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static int` | `get31Bits(byte[] input, int firstByte)`
    `static long` | `getFourBytes(byte[] input, int firstByte)`
    `static int` | `getOneByte(byte[] input, int pos)`
    `static int` | `getThreeBytes(byte[] input, int firstByte)`
    `static int` | `getTwoBytes(byte[] input, int firstByte)`
    `static boolean` | `isBit7Set(byte input)`
    `static void` | `set31Bits(byte[] output, int firstByte, int value)`
    `static void` | `setFourBytes(byte[] output, int firstByte, long value)`
    `static void` | `setOneBytes(byte[] output, int firstByte, int value)`
    `static void` | `setThreeBytes(byte[] output, int firstByte, int value)`
    `static void` | `setTwoBytes(byte[] output, int firstByte, int value)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### isBit7Set

          public static boolean isBit7Set(byte input)

    - #### get31Bits

          public static int get31Bits(byte[] input,
                      int firstByte)

    - #### set31Bits

          public static void set31Bits(byte[] output,
                       int firstByte,
                       int value)

    - #### getOneByte

          public static int getOneByte(byte[] input,
                       int pos)

    - #### getTwoBytes

          public static int getTwoBytes(byte[] input,
                        int firstByte)

    - #### getThreeBytes

          public static int getThreeBytes(byte[] input,
                          int firstByte)

    - #### setOneBytes

          public static void setOneBytes(byte[] output,
                         int firstByte,
                         int value)

    - #### setTwoBytes

          public static void setTwoBytes(byte[] output,
                         int firstByte,
                         int value)

    - #### setThreeBytes

          public static void setThreeBytes(byte[] output,
                           int firstByte,
                           int value)

    - #### getFourBytes

          public static long getFourBytes(byte[] input,
                          int firstByte)

    - #### setFourBytes

          public static void setFourBytes(byte[] output,
                          int firstByte,
                          long value)

Copyright © 2000-2021 Apache Software Foundation. All Rights Reserved.