Package org.infinispan.commons.io
Class SignedNumeric
- java.lang.Object
-
- org.infinispan.commons.io.SignedNumeric
-
public final class SignedNumeric extends Object
Variable length encoding for signed numbers, using the ZigZag technique- Since:
- 8.0
- Author:
- gustavonalle
- See Also:
- https://developers.google.com/protocol-buffers/docs/encoding#types
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static int
decode(int vint)
static int
encode(int vint)
static int
readSignedInt(InputStream in)
static int
readSignedInt(ObjectInput in)
static void
writeSignedInt(ObjectOutput out, int i)
static void
writeSignedInt(OutputStream out, int i)
-
-
-
Method Detail
-
readSignedInt
public static int readSignedInt(ObjectInput in) throws IOException
- Throws:
IOException
-
readSignedInt
public static int readSignedInt(InputStream in) throws IOException
- Throws:
IOException
-
writeSignedInt
public static void writeSignedInt(ObjectOutput out, int i) throws IOException
- Throws:
IOException
-
writeSignedInt
public static void writeSignedInt(OutputStream out, int i) throws IOException
- Throws:
IOException
-
decode
public static int decode(int vint)
-
encode
public static int encode(int vint)
-
-