Class ChunkHeader

java.lang.Object
hudson.remoting.ChunkHeader

public class ChunkHeader extends Object
Parsing of the chunk header.

The header is SIZE bytes, in the network order. The first bit designates whether this chunk is the last chunk (0 if this is the last chunk), and the remaining 15 bits designate the length of the chunk as unsigned number.

Author:
Kohsuke Kawaguchi
  • Field Details

  • Constructor Details

    • ChunkHeader

      public ChunkHeader()
  • Method Details

    • read

      public static int read(ByteBuffer buf)
    • peek

      public static int peek(ByteBuffer buf)
    • peek

      public static int peek(ByteBuffer buf, int pos)
    • parse

      public static int parse(byte[] buf)
    • parse

      public static int parse(byte[] buf, int pos)
    • parse

      public static int parse(int b1, int b2)
    • isLast

      public static boolean isLast(int header)
    • length

      public static int length(int header)
    • write

      public static void write(ByteBuffer buf, int length, boolean hasMore)
    • write

      public static void write(ByteBufferQueue buf, int length, boolean hasMore)
    • pack

      public static byte[] pack(int length, boolean hasMore)