Class VarIntTool

java.lang.Object
io.datarouter.bytes.VarIntTool

public class VarIntTool
extends Object
  • Constructor Details

  • Method Details

    • length

      public static int length​(long value)
    • encode

      public static byte[] encode​(long value)
    • decodeLong

      public static long decodeLong​(byte[] bytes, int offset)
    • decodeLong

      public static long decodeLong​(byte[] bytes)
    • decodeInt

      public static int decodeInt​(byte[] bytes, int offset)
    • decodeInt

      public static int decodeInt​(byte[] bytes)
    • fromInputStream

      public static Optional<Long> fromInputStream​(InputStream is)